Ask Your Question

roscore runns only as root ubuntu 12.04 fuerte

asked 2012-05-21 06:05:44 -0500

Markus Bader gravatar image

updated 2014-01-28 17:12:24 -0500

ngrennan gravatar image


I cannot start the roscore without root rights. I am getting the following message:

me/max/.ros/log/f45ff58e-a35a-11e1-9b99-001fc603da02/roslaunch-rue-3228.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):   File "/usr/local/bin/rosversion", line 4, in <module>
    import pkg_resources   File "/usr/lib/python2.7/dist-packages/", line 2711, in <module>
    parse_requirements(__requires__), Environment()   File "/usr/lib/python2.7/dist-packages/", line 584, in resolve
    raise DistributionNotFound(req) pkg_resources.DistributionNotFound: rospkg==1.0.2 Invalid <param> tag: Cannot load command parameter [rosversion]: command [rosversion ros] returned with code [1]. 

Param xml is <param command="rosversion ros" name="rosversion"/>

running the core with root rights works?

sudo -i
source /opt/ros/fuerte/setup.bash

I am using Ubuntu 12.04 32bit with ros fuerte and I installed everything based on the ppa server.

Any ideas?


edit retag flag offensive close merge delete


In a non-root shell, what do you get for rosversion ros

dornhege gravatar image dornhege  ( 2012-05-21 06:16:59 -0500 )edit

Are you sourcing setup.bash in both cases?

joq gravatar image joq  ( 2012-05-21 06:21:08 -0500 )edit

PPA server? You mean either or one of the mirrors listed on the wiki ( )?

Eric Perko gravatar image Eric Perko  ( 2012-05-21 09:08:03 -0500 )edit

@dornhege rosversion ros chrashes as well, if I run it as root it gives me 1.8.7

@joq yes i am sourcing the setup.bash in both cases

@Eric With PPA server I mean the -> no mirror was used

Markus Bader gravatar image Markus Bader  ( 2012-05-21 20:55:39 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2012-05-22 00:02:47 -0500

Markus Bader gravatar image

I figured it out :-) The problem was a old attempt to install ros from sources with pip and easy_install as it is described on . The attempt places stuff under /usr/local/bin and since I was executing some of the commands with sudo the rights we set to root only. Installing the fuerte ros based on the ppa worked well but old binaries under /usr/local/bin where already placed within the search path before the others and executed instead. This leaded to the permission problems.

The solution was to remove: do delete the related old stuff

cd /usr/local/bin
rm -rf pip pip-2.7 rosco rosdep rosdep-gbp-brew rosdep-source rosinstall roslocate rosversion rosws virtualenv
cd /usr/local/lib
rm -rf python2.7 
# sudo apt-get purge python-pip python-dev build-essential # should not be nessesary but I dit it anyway
sudo apt-get install ros-fuerte-desktop


edit flag offensive delete link more

answered 2012-07-02 02:05:03 -0500

updated 2012-08-26 22:09:34 -0500

jbohren gravatar image

NOTE: The following method of installing / updating rospkg on Ubuntu is now deprecated.

I think this

will answer your problems, just do a

$sudo easy_install -U rospkg

to update the rospkg


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-05-21 06:05:44 -0500

Seen: 1,541 times

Last updated: Aug 26 '12