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

Installation failed, rodep: command not found

asked 2019-10-05 09:50:52 -0500

JohnBT gravatar image

updated 2019-10-08 20:19:13 -0500

I tried to install ros-kinetic-desktop-full on a ubuntu 16.4.

I run :

  $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  $ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  $ sudo apt-get update
 $ sudo apt-get install ros-kinetic-desktop-full

the terminal shows like this (part of it ):

Fetched 196 MB in 2h 12min 39s (24.7 kB/s)                                     
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package libqt5scripttools5:amd64.
(Reading database ... 345016 files and directories currently installed.)
Preparing to unpack .../libqt5scripttools5_5.5.1+dfsg-2build1_amd64.deb ...
Unpacking libqt5scripttools5:amd64 (5.5.1+dfsg-2build1) ...
Selecting previously unselected package libqt5svg5-dev:amd64.
Preparing to unpack .../libqt5svg5-dev_5.5.1-2build1_amd64.deb ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
Processing triggers for systemd (229-4ubuntu21.22) ...
Setting up libqt5scripttools5:amd64 (5.5.1+dfsg-2build1) ...
Setting up libqt5svg5-dev:amd64 (5.5.1-2build1) ...
Setting up libwayland-bin (1.12.0-1~ubuntu16.04.3) ...

Setting up proj-bin (4.9.2-2) ...
Setting up ros-kinetic-rqt-robot-plugins (0.5.7-0xenial-20190913-232816+0000) ...
Setting up ros-kinetic-viz (1.3.2-0xenial-20190913-232918+0000) ...
Setting up ros-kinetic-desktop (1.3.2-0xenial-20190913-233042+0000) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...

After the process is finished , I run:

$ sudo rosdep init
sudo: rodep: command not found

It seems that ROS is not installed. I tried to install rosdep agan using pip. It seems work. I also tried to install rosdep using apt, the terminal shows:

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:
 python-roslaunch : Depends: python-roslib but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The output of

$ sudo apt-get install ros-kinetic-ros-base 

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libboost-all-dev libboost-graph-dev python-catkin-pkg
  python-catkin-pkg-modules python-crypto python-ecdsa python-paramiko
  python-rosdep python-rosdistro python-rosdistro-modules python-rospkg
  python-rospkg-modules ros-kinetic-actionlib ros-kinetic-actionlib-msgs
  ros-kinetic-bond ros-kinetic-bond-core ros-kinetic-bondcpp
  ros-kinetic-bondpy ros-kinetic-catkin ros-kinetic-class-loader
  ros-kinetic-cmake-modules ros-kinetic-common-msgs ros-kinetic-cpp-common
  ros-kinetic-diagnostic-msgs ros-kinetic-dynamic-reconfigure
  ros-kinetic-gencpp ros-kinetic-geneus ros-kinetic-genlisp ros-kinetic-genmsg
  ros-kinetic-gennodejs ros-kinetic-genpy ros-kinetic-geometry-msgs
  ros-kinetic-message-filters ros-kinetic-message-generation
  ros-kinetic-message-runtime ros-kinetic-mk ros-kinetic-nav-msgs
  ros-kinetic-nodelet ros-kinetic-nodelet-core ros-kinetic-nodelet-topic-tools
  ros-kinetic-pluginlib ros-kinetic-ros ros-kinetic-ros-comm
  ros-kinetic-ros-core ros-kinetic-ros-environment ros-kinetic-rosbag
  ros-kinetic-rosbag-migration-rule ros-kinetic-rosbag-storage
  ros-kinetic-rosbash ros-kinetic-rosboost-cfg ros-kinetic-rosbuild
  ros-kinetic-rosclean ros-kinetic-rosconsole ros-kinetic-rosconsole-bridge
  ros-kinetic-roscpp ros-kinetic-roscpp-core ros-kinetic-roscpp-serialization
  ros-kinetic-roscpp-traits ros-kinetic-roscreate ros-kinetic-rosgraph
  ros-kinetic-rosgraph-msgs ros-kinetic-roslang ros-kinetic-roslaunch
  ros-kinetic-roslib ros-kinetic-roslisp ros-kinetic-roslz4
  ros-kinetic-rosmake ros-kinetic-rosmaster ros-kinetic-rosmsg
  ros-kinetic-rosnode ros-kinetic-rosout ros-kinetic-rospack
  ros-kinetic-rosparam ros-kinetic-rospy ros-kinetic-rosservice
  ros-kinetic-rostest ros-kinetic-rostime ros-kinetic-rostopic
  ros-kinetic-rosunit ros-kinetic-roswtf ros-kinetic-sensor-msgs
  ros-kinetic-shape-msgs ros-kinetic-smclib ros-kinetic-std-msgs
  ros-kinetic-std-srvs ros-kinetic-stereo-msgs ros-kinetic-topic-tools
  ros-kinetic-trajectory-msgs ros-kinetic-visualization-msgs
  ros-kinetic-xmlrpcpp
Suggested packages:
  python-crypto-dbg python-crypto-doc
The following NEW packages will be installed:
  libboost-all-dev libboost-graph-dev python-catkin-pkg
  python-catkin-pkg-modules python-crypto python-ecdsa python-paramiko
  python-rosdep python-rosdistro python-rosdistro-modules python-rospkg
  python-rospkg-modules ros-kinetic-actionlib ros-kinetic-actionlib-msgs
  ros-kinetic-bond ...
(more)
edit retag flag offensive close merge delete

Comments

I'm not sure how, but you seem to have mixed regular ROS packages with UpstreamPackages.

python-roslaunch and python-roslib are not part of the normal Kinetic distribution.

You can verify this by running:

apt-cache policy python-roslaunch

It should point to the Ubuntu package repository, and not to packages.ros.org.

Have you at any point installed ros-desktop-full? Or any of those packages? That could result in these kinds of problems.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-05 11:04:08 -0500 )edit

@gvdhoorn thank you a lot, but I can't figure out what does the ouput mean:

$ apt-cache policy python-roslaunch
python-roslaunch:
  Installed: (none)
  Candidate: 1.11.16-3
  Version table:
     1.11.16-3 500
        500 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial/universe amd64 Packages
        500 http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial/universe i386 Packages
JohnBT gravatar image JohnBT  ( 2019-10-05 11:46:35 -0500 )edit

The output shows you that python-roslaunch comes from your Ubuntu mirror, not from the ROS package repositories.

With a normal ROS Kinetic installation, python-roslaunch would not be installed, and neither would python-roslib.

You'll have to uninstall the upstream packages that are conflicting with the normal packages. I'm not entirely sure how automated that could be.

As a quick check: what is the output of dpkg -l | grep ros-core?

gvdhoorn gravatar image gvdhoorn  ( 2019-10-05 11:57:47 -0500 )edit

@gvdhoorn I run apt-get remove ros-kinetic* and deleted files related to ros by hand. Then I tried to reinstall ros

sudo apt-get install ros-kinetic-desktop

terminal shows

The following packages have unmet dependencies:
 ros-kinetic-desktop : Depends: ros-kinetic-common-tutorials but it is not going to be installed
                       Depends: ros-kinetic-geometry-tutorials but it is not going to be installed
                     ...
                       Depends: ros-kinetic-visualization-tutorials but it is not going to be installed
                       Depends: ros-kinetic-viz but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

then I tried aptitude, there is still error like this:

The following packages have unmet dependencies:
 libjpeg-turbo8-dev : Depends: libjpeg-turbo8 (= 1.4.2-0ubuntu3) but 1.4.2-0ubuntu3.1 is installed.

what happened??

JohnBT gravatar image JohnBT  ( 2019-10-05 13:19:56 -0500 )edit

I run apt-get remove ros-kinetic* and deleted files related to ros by hand.

That is not what I wrote.

I suggested to remove everything related to the upstream packages. Not the regular ros-kinetic-* packages.

It's likely your system is currently in a state where some packages are newer than what the ros-kinetic-* packages are built for.

I would suggest to remove all packages that come from the upstream packages set (yes, I realise this is vague, but I cannot make it any more concrete) and then try installing ros-kinetic-ros-base. If that works, you should at least have a minimal set of proper packages to continue with.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-06 05:33:27 -0500 )edit

@gvdhoorn Thanks for ur kind reply but im still stucked。
I cannot figure it out why I got upstream packages and what packages should be removed. Is there anyway I can use ros without reinstall ubuntu?

JohnBT gravatar image JohnBT  ( 2019-10-07 13:23:14 -0500 )edit

What is the output of sudo apt update && sudo apt install ros-kinetic-ros-base?

gvdhoorn gravatar image gvdhoorn  ( 2019-10-07 13:36:29 -0500 )edit

I may have a way to check whether there are any "upstream packages" installed.

As follows:

# if you already have aptitude installed, you don't need to reinstall it
sudo apt update && sudo apt install aptitude

cd /tmp
wget https://gist.github.com/gavanderhoorn/72741c405f9c0648000d35ca2723cca6/raw/55c3252b210c7e9ea9514b02da09a61674fc6c3f/ros_list_upstream_pkgs.bash

# executing this can take a while
bash ros_list_upstream_pkgs.bash

If this results in any output (ie: prints the name of a package) you would appear to have an upstream package installed. Except python-rospkg and python-catkin-pkg, for those you'd need to check the output of apt-cache policy <pkg_name>. If that doesn't show packages.ros.org as the source, it'd be an upstream package.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-07 15:28:05 -0500 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2019-10-10 03:22:24 -0500

gvdhoorn gravatar image

It appears OP had multiple Python interpreters installed on his system, one of which located in /usr/local.

As that took precedence over the system-provided Python (ie: 2.7 on Ubuntu Xenial), and apt-distributed python-* packages are only installed in the default locations, including the many ROS Python packages and dependencies, various import statements failed with "No module named X".

Removing the interpreter from /usr/local was not sufficient, as there also seemed to be something wrong with the, still present, system Python 2.7 install.

Reinstallation using sudo apt install --reinstall python-minimal python2.7-minimal python2.7 python-pip seemed to have restored the system-provided Python installation to a state where things seem to have normalised sufficiently for things like rosdep and roscore to start working again.

edit flag offensive delete link more

Comments

(this is not directed at the OP)

In the end this appears to be another example of users (inadvertently) using a different Python interpreter (whether another 2.7.x version, Anaconda or something else) and expecting everything to just work (perhaps a justified expectation).

But as each interpreter has its own package/module search path, and apt distributed pkgs are only installed into whatever the Linux distribution maintainers consider the "default path", anything but the default Python interpreter will not be able to locate those packages, resulting in all sorts of problems such as experienced by the OP.

A related discussion on ROS Discourse: Should we warn (new) users about difficulties with Python 3 and alternative Python interpreters?

gvdhoorn gravatar image gvdhoorn  ( 2019-10-10 03:24:39 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-10-05 09:50:52 -0500

Seen: 4,527 times

Last updated: Oct 10 '19