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

Repair ROS indigo installation on Ubuntu 14.04 by copying files from another PC?

asked 2016-05-31 14:56:56 -0500

mcRos gravatar image

updated 2016-06-01 08:40:09 -0500

I once installed ROS following this website. However I messed up the installation, deleted /opt/ros but now I cannot reinstall ROS. We have another computer here with the same Ubuntu 14.04. Is it possible that I just copy the ROS installation from that computer?

Which are the folder I would have to copy?

I copied /opt/ros but it's still complaining about

Traceback (most recent call last):  
File "/opt/ros/indigo/bin/roscore", line 36, in <module>
    from rosmaster.master_api import NUM_WORKERS ImportError: No module
named rosmaster.master_api

Does someone have experience with that?

When I just type sudo apt-get install ros-indigo-desktop-full I get:

sudo apt-get install ros-indigo-desktop-full [sudo]
Reading package lists...
Done Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have requested an impossible situation or if you are
using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ros-indigo-desktop-full : Depends: ros-indigo-desktop but it is not going to be installed
                           Depends: ros-indigo-perception but it is not going to be installed
                           Depends: ros-indigo-simulators but it is not going to be installed
                           E: Unable to correct problems, you have held broken packages.

dpkg-l ros-indigo-* gives:

$ dpkg -l ros-indigo-* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-==============-==============-============================================ un
ros-indigo-catkin <none> <none> (no description available) rc ros-indigo-octomap
1.6.9-0trusty- amd64 The OctoMap library implements a 3D occupanc rc ros-indigo-orocos-k
1.3.0-0trusty- amd64 This package contains a recent version of th rc ros-indigo-stage
4.1.1-8trusty- amd64 Mobile robot simulator http://rtv.github.com

edit retag flag offensive close merge delete

Comments

It would probably be better to actually reinstall things. Can you tell us a bit more about why you "cannot reinstall ROS"? What errors do you get, what have you tried?

gvdhoorn gravatar image gvdhoorn  ( 2016-05-31 15:13:34 -0500 )edit

I updated my question with the error message I'm getting

mcRos gravatar image mcRos  ( 2016-06-01 04:40:04 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-05-31 15:23:39 -0500

ahendrix gravatar image

updated 2016-06-01 12:32:00 -0500

You should be able to query dpkg for the list of installed ROS packages with dpkg -l ros-indigo-*

Further, you should be able to filter that to just the installed package names with:

dpkg -l ros-indigo-* | grep '^ii' | awk '{ print $2;}'

You can then reinstall those packages with apt-get install --reinstall:

dpkg -l ros-indigo-* | grep '^ii' | awk '{ print $2;}' | sudo xargs apt-get install --reinstall
edit flag offensive delete link more

Comments

I'm quite afraid of following your proposal. I have a quite sensitve system with Nvidia drivers and Cuda installed. I already crashed my system several times and it often starts with some linux command that says "apt-get install anyPckgCalledRos". Mostly graphics related libs are killers, eg libmesa

mcRos gravatar image mcRos  ( 2016-06-01 04:44:48 -0500 )edit

By the way: I added the output of dpkg-l ros-indigo-* to my question above

mcRos gravatar image mcRos  ( 2016-06-01 08:34:42 -0500 )edit

It looks like there is a lot more wrong with your system then just having /opt/ros deleted, and from the output of dpkg it looks like something you did uninstalled the apt packages for ROS.

ahendrix gravatar image ahendrix  ( 2016-06-01 12:29:44 -0500 )edit

The second command I listed ( dpkg -l ros-indigo-* | grep '^ii' | awk '{ print $2;}' ) will print the list of packages that apt thinks are still installed.

ahendrix gravatar image ahendrix  ( 2016-06-01 12:31:05 -0500 )edit
0

answered 2016-06-01 09:40:11 -0500

You could try to fully uninstall ROS sudo apt-get purge ros* which will delete all ros packages, including config files, and then try sudo apt-get install ros-indigo-desktop-full to reinstall it

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-31 14:56:56 -0500

Seen: 2,169 times

Last updated: Jun 01 '16