0
$\begingroup$

Rosanswers logo

Hi guys,

I'm running into an error when installing ROS (melodic) on Ubuntu (18.04). As I have absolutely no experience with UNIX, I don't really know what's going on or how to fix it.

First, I tried installing it with sudo apt-get install ros-melodic-desktop-full but that didn't work because it wasn't found. Following the suggestion of an online post, I switched to installing it from source.

AddOn: Sorry that I haven't mentioned that in advance (didn't make the connection): I'm running Ubuntu on the Windows Subsystem for Linux (WSL) and I already have Python3 installed on windows. Ref. comment in this ROS Answer. How can I check whether this is the problem?

Now I'm following these instructions: melodic installation from source

Everything worked up to point 2.1.1 Resolving Dependencies. Doing this step (again), I get the info:

~/ros_catkin_ws$ rosdep install --from-paths src --ignore-src --rosdistro melodic -y
executing command [sudo -H apt-get install -y python-rosdep]
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'python-rosdep2' instead of 'python-rosdep'
python-rosdep2 is already the newest version (0.11.8-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
ERROR: the following rosdeps failed to install
  apt: Failed to detect successful installation of [python-rosdep]

Then I proceed with the installation tutorial trying to build the catkin workspace:

~/ros_catkin_ws$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
Traceback (most recent call last):
  File "./src/catkin/bin/catkin_make_isolated", line 12, in <module>
    from catkin.builder import build_workspace_isolated
  File "./src/catkin/bin/../python/catkin/builder.py", line 66, in <module>
    from catkin_pkg.terminal_color import ansi, disable_ANSI_colors, fmt, sanitize
ImportError: No module named terminal_color

This is my Ubuntu release:

~/ros_catkin_ws$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04

According to the answer from 130s I tried the command sudo apt-get update, but that didn't work initially due to a key not being available:

$ sudo apt-get update
[sudo] password for stivari:
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://packages.ros.org/ros/ubuntu bionic InRelease [4031 B]
Err:5 http://packages.ros.org/ros/ubuntu bionic InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5523BAEEB01FA116
Reading package lists... Done
W: GPG error: http://packages.ros.org/ros/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5523BAEEB01FA116
E: The repository 'http://packages.ros.org/ros/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Adding the key solved this and rosdep runs successfully after sudo apt-get update:

$ curl -sL "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x5523BAEEB01FA116" | sudo apt-key add
$ sudo apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:5 http://packages.ros.org/ros/ubuntu bionic InRelease [4031 B]
Get:6 http://packages.ros.org/ros/ubuntu bionic/main amd64 Packages [305 kB]
Fetched 309 kB in 4s (73.8 kB/s)
Reading package lists... Done

~/ros_catkin_ws$ rosdep install --from-paths src --ignore-src --rosdistro melodic -y
executing command [sudo -H apt-get install -y python-rosdep]
[sudo] password for stivari:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  python-rosdep2
The following NEW packages will be installed:
  python-rosdep
0 upgraded, 1 newly installed, 1 to remove and 12 not upgraded.
Need to get 46.7 kB of archives.
After this operation, 16.4 kB of additional disk space will be used.
Get:1 http://packages.ros.org/ros/ubuntu bionic/main amd64 python-rosdep all 0.12.2-1 [46.7 kB]
Fetched 46.7 kB in 1s (49.4 kB/s)
(Reading database ... 122878 files and directories currently installed.)
Removing python-rosdep2 (0.11.8-1) ...
Selecting previously unselected package python-rosdep.
(Reading database ... 122834 files and directories currently installed.)
Preparing to unpack .../python-rosdep_0.12.2-1_all.deb ...
Unpacking python-rosdep (0.12.2-1) ...
Setting up python-rosdep (0.12.2-1) ...
Processing triggers for man-db (2.8.3-2) ...
#All required rosdeps installed successfully

But after that, I'm running into the same error:

~/ros_catkin_ws$ ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release
Traceback (most recent call last):
  File "./src/catkin/bin/catkin_make_isolated", line 12, in <module>
    from catkin.builder import build_workspace_isolated
  File "./src/catkin/bin/../python/catkin/builder.py", line 66, in <module>
    from catkin_pkg.terminal_color import ansi, disable_ANSI_colors, fmt, sanitize
ImportError: No module named terminal_color

If you need any additional info, please ask and tell me how to get them.

Thanks, Andre


Originally posted by AndreKissling on ROS Answers with karma: 13 on 2018-09-22

Post score: 1


Original comments

Comment by 130s on 2018-09-23:\

Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)

When you see something like this you need to run the commands in admin mode. Add sudo in the beginning of the command (that's Linux basics so you can find lots of info by Googling the error message ;)

Comment by gvdhoorn on 2018-09-24:\

I'm following these instructions: melodic installation from source

First question: why do you want to install Melodic from sources on Ubuntu 18, for which binary packages are available (ie: simple apt install ros-melodic-****)?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

First, I tried installing it with sudo apt-get install ros-melodic-desktop-full but that didn't work because it wasn't found. Following the suggestion of an online post, I switched to installing it from source.

I would strongly recommend to not install from sources. Especially not under WSL. It's very slow, and you'll spend way too much time managing your installation.

A binary installation is almost always preferred over building things from sources.

desktop_full has been released into Melodic (see status_page/ros_melodic_default.html?q=full fi), so if you couldn't install that, I'm wondering whether you setup your system correctly.

Please figure out whether you have a need for installing ROS from sources, and if you don't, I would revert whatever you already have done and we should try to figure out why sudo apt install ros-melodic-desktop-full didn't work for you, not start a source install and diagnosing problems with that.


Edit: just noticed this:

I tried the command sudo apt-get update, but that didn't work initially due to a key not being available

If the key also wasn't available the first time you tried sudo apt-get install ros-melodic-desktop-full, then that was the reason why apt couldn't find the package.


Originally posted by gvdhoorn with karma: 86574 on 2018-09-24

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by AndreKissling on 2018-09-27:
After adding the key manually it was possible to install it using apt-get install. Thanks!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.