Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I had the same problem today which I manged to resolve and I think this is the best place to give the reasons and solution.

Firstly, when we try: rosdep update

We get the following message, as OP mentions:

ERROR: unable to process source [https://github.com/ros/rosdistro/raw/master/releases/fuerte.yaml]:
Failed to download target platform data for gbpdistro: invalid repo spec in bpdistro data: You must update to a newer rosdep version by calling..sudo apt-get update && sudo apt-get install python-rosdep (make sure to uninstall the pip version on Ubuntu)
updated cache in /home/wagnelib/.ros/rosdep/sources.cache

The solution mentioned in this error message is incomplete (or let's say ambiguous). To me it seems like, "remove pip" and install the python-rosdep. Doing this leads to the following (this is what OP got):

$ which rosdep
/usr/bin/rosdep
$ rosdep --version
0.9.5
$ apt-cache policy python-rosdep
python-rosdep:
Installed: 0.10.11-1
Candidate: 0.10.11-1
Version table:
*** 0.10.11-1 0
    500 http://packages.ros.org/ros/ubuntu/ precise/main i386 Packages
    100 /var/lib/dpkg/status

As can be seen, rosdep version is 0.9.5, whereas the apt-cache policy is for rosdep version 0.10.7-1. That is, although we installed the latest version using apt-get, the detected version is still the old one. What is the cause? The cause is, previous rosdep could only be installed/uninstalled using pip. So, we will have to uninstall the older rosdep using pip (which means, when the original solution said "uninstall the pip version", what was really meant was "uninstall older rosdep using pip"). This is how it would look:

$sudo pip uninstall rosdep

Now we can remove "pip" if we like, and we reinstall the newer version of rosdep:

$sudo apt-get remove --purge python-rosdep python-pip

Next, follow the regular steps:

$sudo apt-get update && sudo apt-get install python-rosdep
$which rosdep
 /usr/bin/rosdep
$rosdep --version
  0.10.11
$apt-cache policy python-rosdep
  python-rosdep:
  Installed: 0.10.11-1
  Candidate: 0.10.11-1
  Version table:
   *** 0.10.11-1 0
    500 http://packages.ros.org/ros/ubuntu/ precise/main i386 Packages
    100 /var/lib/dpkg/status

All the versions match now:). Remove the old sources file and perform rosdep init and update :

$sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
$sudo rosdep init
$rosdep update
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/osx-homebrew.yaml
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/gentoo.yaml
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/base.yaml
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/python.yaml
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/ruby.yaml
  Hit https://github.com/ros/rosdistro/raw/master/releases/fuerte.yaml
  Hit https://github.com/ros/rosdistro/raw/master/releases/groovy.yaml
  updated cache in /home/race/.ros/rosdep/sources.cache

And there it is, rosdep is ready for use. I hope this is useful.

I had the same problem today which I manged to resolve and I think this is the best place to give the reasons and solution.

Firstly, when we try: rosdep update

rosdep update

We get the following message, as OP mentions:

ERROR: unable to process source [https://github.com/ros/rosdistro/raw/master/releases/fuerte.yaml]:
Failed to download target platform data for gbpdistro: invalid repo spec in bpdistro data: You must update to a newer rosdep version by calling..sudo apt-get update && sudo apt-get install python-rosdep (make sure to uninstall the pip version on Ubuntu)
updated cache in /home/wagnelib/.ros/rosdep/sources.cache

The solution mentioned in this error message is incomplete (or let's say ambiguous). To me it seems like, "remove pip" and install the python-rosdep. Doing this leads to the following (this is what OP got):

$ which rosdep
/usr/bin/rosdep
$ rosdep --version
0.9.5
$ apt-cache policy python-rosdep
python-rosdep:
Installed: 0.10.11-1
Candidate: 0.10.11-1
Version table:
*** 0.10.11-1 0
    500 http://packages.ros.org/ros/ubuntu/ precise/main i386 Packages
    100 /var/lib/dpkg/status

As can be seen, rosdep version is 0.9.5, whereas the apt-cache policy is for rosdep version 0.10.7-1. That is, although we installed the latest version using apt-get, the detected version is still the old one. What is the cause? The cause is, previous rosdep could only be installed/uninstalled using pip. So, we will have to uninstall the older rosdep using pip (which means, when the original solution said "uninstall the pip version", what was really meant was "uninstall older rosdep using pip"). This is how it would look:

$sudo pip uninstall rosdep

Now we can remove "pip" if we like, and we reinstall the newer version of rosdep:

$sudo apt-get remove --purge python-rosdep python-pip

Next, follow the regular steps:

$sudo apt-get update && sudo apt-get install python-rosdep
$which rosdep
 /usr/bin/rosdep
$rosdep --version
  0.10.11
$apt-cache policy python-rosdep
  python-rosdep:
  Installed: 0.10.11-1
  Candidate: 0.10.11-1
  Version table:
   *** 0.10.11-1 0
    500 http://packages.ros.org/ros/ubuntu/ precise/main i386 Packages
    100 /var/lib/dpkg/status

All the versions match now:). Remove the old sources file and perform rosdep init and update :

$sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
$sudo rosdep init
$rosdep update
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/osx-homebrew.yaml
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/gentoo.yaml
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/base.yaml
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/python.yaml
  Hit https://github.com/ros/rosdistro/raw/master/rosdep/ruby.yaml
  Hit https://github.com/ros/rosdistro/raw/master/releases/fuerte.yaml
  Hit https://github.com/ros/rosdistro/raw/master/releases/groovy.yaml
  updated cache in /home/race/.ros/rosdep/sources.cache

And there it is, rosdep is ready for use. I hope this is useful.