ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

How do I recover ros root setup.bash?

asked 2021-07-14 04:53:17 -0500

JoaoPedro gravatar image

Hello,

I accidentally deleted the setup.bash and all other root files from "/opt/ros/noetic/".

Is there any way to recover that without reinstalling the ROS?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-07-14 05:51:25 -0500

gvdhoorn gravatar image

updated 2021-07-14 06:48:24 -0500

(I'm sssuming you've installed ROS using apt here)

This seems similar to #q257332, and you could use a similar approach to figure out which package provides those files (or any file really):

dpkg -S /opt/ros/noetic/setup.bash

which returns this for me:

ros-noetic-catkin: /opt/ros/noetic/setup.bash

you can then reinstall that using:

sudo apt install --reinstall ros-noetic-catkin
edit flag offensive delete link more

Comments

Thank you.

This approach correctly restores the files. However, once I didn't have the file anymore, figuring out that it comes from ros-noetic-catkin is not possible without your suggestion. Does it have another method (website or similar) to verified this?

JoaoPedro gravatar image JoaoPedro  ( 2021-07-14 08:12:42 -0500 )edit

It's a generated file, so I don't believe you would be able to find it anywhere necessarily.

gvdhoorn gravatar image gvdhoorn  ( 2021-07-14 09:34:38 -0500 )edit

Question Tools

Stats

Asked: 2021-07-14 04:53:17 -0500

Seen: 140 times

Last updated: Jul 14 '21