Ask Your Question
0

Win10-WSL: problems installing ROS on Ubuntu 18.04

asked 2018-10-29 09:24:29 -0500

SlopeSurfer gravatar image

updated 2018-10-31 04:17:55 -0500

gvdhoorn gravatar image

I am trying to install ROS on a windows 10 system (version 1803) following the instructions at http://www.ros.org/ and alternately https://janbernloehr.de/2017/06/10/ro... help which I reached from http://wiki.ros.org/Installation/Windows .

I have made sure that WSL is turned on. I installed the latest Ubuntu from: https://www.microsoft.com/en-us/p/ubu...

The following gives the ubuntu release information (I do not know what it means that “No LSB modules are available” but have included it for completeness).

karl@DESKTOP-H1L55EN:/mnt/c/Users/Karl$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

One thing to note from Jan’s version, he does not show configuring a Ubuntu repository. Once he gets a modern version of WSL going, he goes straight to setting up the sources list and keys. This is important to note because, for me, configuring my Ubuntu repository (from the suggested source:

https://help.ubuntu.com/community/Rep... which leads to https://help.ubuntu.com/community/Apt... )

is far more complicated than all the rest of the installation steps combined, i.e., I’d love to skip it as well.

From: https://answers.ros.org/question/1901... I gather that I don’t really need to set up the keys to continue the installation process. However, I get errors if I try the follow-on steps (which I’ll show later on). So, I thought I should try to get the repository configured before I continued (in case that is causing any or all of the downstream problems).

I downloaded all the suggested repository files with the following caveat. The instructions call for Packages.bz2 , Packages.gz, and Release from the main, multiverse, restricted, and universe components for the needed architecture (amd64) to be placed in the appropriate directories on my machine. Each of the locations had two of those files, but no packages.bz2. They did each have packages.xz. So, I downloaded them instead. So, now I have the following in folders in my … dists/bionics directory.

karl@DESKTOP-H1L55EN:/home/repository/dists/bionic$ dir  
Contents-amd64.gz  Release  Release.gpg  main  multiverse  restricted  universe
karl@DESKTOP-H1L55EN:/home/repository/dists/bionic$.

And main (as well as multiverse, restricted, and universe) each look like the following:

karl@DESKTOP-H1L55EN:/home/repository/dists/bionic/main$ dir
Packages.gz  Packages.xz  Release

The next step (Add the local repository in your sources list) was not clear to me.
From: https://help.ubuntu.com/community/Rep... It would appear that my /etc/apt/sources.list should have lines that look like the following.

deb http://us.archive.ubuntu.com/ubuntu/ saucy universe
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy universe
deb http://us.archive.ubuntu.com/ubuntu/ saucy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ saucy-updates universe

where bionic should be substituted for saucy.

The following uncommented lines are in my sources.list
deb http://archive.ubuntu.com ...
(more)
edit retag flag offensive close merge delete

Comments

Can you please fix the formatting of your question?

+100 for using Preformatted Text for all the console output and config files, but for the rest of the text it's not needed and makes things hard to read.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-29 09:26:57 -0500 )edit

And a first comment: I don't know what you are doing exactly with the dists/bionic/main steps, but that should all not be needed. You can treat 18.04 on WSL as a regular Ubuntu, and you wouldn't do that on a "real Linux" system either.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-29 09:28:49 -0500 )edit

I would suggest:

  1. remove everything you've done earlier
  2. reinstall 18.04 from the MS store
  3. follow the regular Ubuntu Bionic ROS install instructions (apt)

Everything should work as normal. The blog post is nice, but there is nothing special to Win10/WSL (apart from the X-server bits).

gvdhoorn gravatar imagegvdhoorn ( 2018-10-29 09:30:41 -0500 )edit

To edit your question, press the edit button/link right below the question text (a bit to the right of the big "Comments" heading).

gvdhoorn gravatar imagegvdhoorn ( 2018-10-29 10:07:49 -0500 )edit

Thank you for the persistence on the editing. From your first suggestion, I tried hitting the edit button that was next to the question, not realizing that would only edit the question. From your last suggestion I found the edit button at the bottom.

SlopeSurfer gravatar imageSlopeSurfer ( 2018-10-29 11:51:46 -0500 )edit

Unless I am mistaken, the regular Ubuntu Bionic ROS installation steps say to set up the repository. It does not say how, but has a link, which is where I start to get bogged down (that is what the dist/bionic/main stuff is about) Big question: Do I need to set up a repository?

SlopeSurfer gravatar imageSlopeSurfer ( 2018-10-29 11:58:58 -0500 )edit

Do I need to set up a repository?

No.

the regular Ubuntu Bionic ROS installation steps say to set up the repository

yes, and that means adding an apt source to your local configuration. Which you do by following the steps in the Setup your sources.list section of the install doc.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-29 12:41:59 -0500 )edit

It does not say how, but has a link, which is where I start to get bogged down

the context for that link is:

Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse."

So you only follow the sections on the Canonical page that tell you how to do that.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-29 12:42:46 -0500 )edit

1 Answer

Sort by » oldest newest most voted
4

answered 2018-10-30 03:33:08 -0500

gvdhoorn gravatar image

updated 2018-10-30 04:10:53 -0500

Edit1:

after looking into this some more I believe you're running into a documented issue with 18.04 and WSL: Microsoft/WSL#3286: Ubuntu 18.04 gpg dirmngr IPC connect call failed (and sbt/sbt#4261).

Apparently this is a bug in gpg (from this comment) and has already been fixed, but Ubuntu 18.04 is still providing users with the non-fixed version.

So the only real fix would be for Canonical to start distributing the fixed version of gpg, but that can take a while.

As a work-around, you can try the following command to import the key, which uses a different approach (we first make sure you have wget installed, then use that to download the key and immediately import it using apt-key):

sudo apt install -y wget
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -

Now you should be able to sudo apt update and eventually sudo apt install ros-melodic-desktop-full.

If this fixes it, the problem with your setup was always just the key for the repository missing. That key is a cryptographic key that is used to verify that the packages that you install using apt have not been tampered with. Without that key, apt cannot verify this and that leads to errors such as:

The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5523BAEEB01FA116

It's just apt telling you that it cannot verify the contents of the new repository and then ignoring it (as ignoring it seems like a safe thing to do).

If the alternative approach successfully imports the key, then everything should start working.


Old answer:

I just tried this in an empty Docker container running Ubuntu Bionic (note: you do not need to do any of this, I just didn't have a Bionic machine available, so I used Docker to test the installation procedure).

The packages I had to make sure were there at the minimum were: lsb-release, dirmngr and gnupg2. This is also what the Docker images created by @ruffsl install (here). After having installed those, 'everything' worked and I could apt install ros-melodic-desktop-full.

Again: you do not need to do anything with Docker.

Can you run the following commands and copy-paste the output into your question (in a new edit):

sudo apt clean && sudo apt update
sudo apt install -y dirmngr lsb-release gnupg2

At this point you should be able to run sudo apt install ros-melodic-desktop-full (or any other ROS package really).

edit flag offensive delete link more

Comments

As a PS: please be aware that installing ROS under WSL will not allow you a typical ROS user experience. Access to hardware is extremely limited under WSL and getting GUI applications to work can be a challenge.

Performance of various tools / nodes might also be impacted.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-30 03:59:20 -0500 )edit

furthermore: you will really be running Ubuntu Linux inside Windows and it's not an actual ROS-on-Windows setup. You cannot use Visual Studio to develop anything for instance.

If you really want to use ROS on Windows, you might want to take a look at the experimental port that ..

gvdhoorn gravatar imagegvdhoorn ( 2018-10-30 04:01:25 -0500 )edit

.. Microsoft has made available recently. See Introducing ROS1 on Windows for the announcement.

gvdhoorn gravatar imagegvdhoorn ( 2018-10-30 04:01:53 -0500 )edit

I can't thank gvdhoorn enough for his patience, persistence, and rapidness on this.

SlopeSurfer gravatar imageSlopeSurfer ( 2018-10-30 12:53:18 -0500 )edit

Good to hear you got things to work.

I'm curious whether upgrading gpg would have worked as well.

I don't see a lot of reports about this problem from 'native' installs of Ubuntu 18.04 (ie: not using WSL).

gvdhoorn gravatar imagegvdhoorn ( 2018-10-30 13:36:35 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-10-29 09:24:29 -0500

Seen: 3,232 times

Last updated: Oct 31 '18