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

How to install catkin correctly

asked 2019-09-23 11:13:38 -0500

notSoTechnical gravatar image

updated 2019-09-23 12:10:08 -0500

gvdhoorn gravatar image

Straight dump of the error messages:

notsotechnical@notsotechnical-VirtualBox:~$ **sudo apt-get install ros-melodic-catkin**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
**E: Unable to locate package ros-melodic-catkin**
notsotechnical@notsotechnical-VirtualBox:~$ **sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential**
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python-catkin-pkg : Depends: python-catkin-pkg-modules (>= 0.4.13) but it is not going to be installed
 python-rosdep : Depends: python-rospkg (>= 1.1.8) but 1.1.4-1 is to be installed
                 Depends: python-rosdistro (>= 0.7.0) but it is not going to be installed
 python-rosinstall : Depends: python-vcstools (>= 0.1.38) but it is not going to be installed
                     Depends: python-rosdistro (>= 0.3.0) but it is not going to be installed
                     Depends: subversion but it is not going to be installed
                     Depends: mercurial but it is not going to be installed
                     Depends: bzr but it is not going to be installed
 python-rosinstall-generator : Depends: python-rosdistro (>= 0.7.3) but it is not going to be installed
 python-wstool : Depends: python-vcstools (>= 0.1.38) but it is not going to be installed
                 Depends: subversion but it is not going to be installed
                 Depends: mercurial but it is not going to be installed
                 Depends: bzr but it is not going to be installed
**E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).**
notsotechnical@notsotechnical-VirtualBox:~$ **apt --fix-broken install**
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
notsotechnical@notsotechnical-VirtualBox:~$ sudo apt-get update
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic InRelease                    
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease            
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                  
Hit:5 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease          
Hit:6 http://packages.ros.org/ros/ubuntu trusty InRelease                     
Hit:7 http://dl.google.com/linux/chrome/deb stable Release                    
Reading package lists... Done                      
notsotechnical@notsotechnical-VirtualBox:~$ sudo apt-get install ros-melodic-catkin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ros-melodic-catkin
notsotechnical@notsotechnical-VirtualBox:~$ sudo apt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python-catkin-pkg : Depends: python-catkin-pkg-modules (>= 0.4.13) but it is not going to be installed
 python-rosdep : Depends: python-rospkg (>= 1.1.8) but 1.1.4-1 is to be installed
                 Depends: python-rosdistro (>= 0.7.0) but it is not going to be installed
 python-rosinstall : Depends: python-vcstools (>= 0.1.38) but it is not going to be installed
                     Depends: python-rosdistro (>= 0.3.0 ...
(more)
edit retag flag offensive close merge delete

Comments

2
Hit:6 http://packages.ros.org/ros/ubuntu trusty InRelease

This seems strange: you have configured apt to download package indices for Ubuntu Trusty (ie: 14.04), but then ask apt to install ros-melodic-catkin. ROS Melodic is only supported on Ubuntu Bionic (ie: 18.04) so that cannot work.

You cannot install ROS Indigo packages on 18.04 either.

You've tagged your question with ubuntu-18.04.

Can you please clarify which version of Ubuntu you are using and which version of ROS you want to install?

gvdhoorn gravatar image gvdhoorn  ( 2019-09-23 12:12:00 -0500 )edit

Sorry for the confusion. I have indigo... I also did this: notsotechnical@notsotechnical-VirtualBox:~/build/build$ sudo apt-get install ros-indigo-catkin [sudo] password for notsotechnical: Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package ros-indigo-catkin

notsotechnical@notsotechnical-VirtualBox:~/build/build$ sudo apt-get install python-catkin-pkg [sudo] password for notsotechnical: Reading package lists... Done Building dependency tree
Reading state information... Done python-catkin-pkg is already the newest version (0.4.13-100). You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: python-catkin-pkg : Depends: python-catkin-pkg-modules (>= 0.4.13) but it is not installable E: Unmet dependencies. Try 'apt --fix-broken install

notSoTechnical gravatar image notSoTechnical  ( 2019-09-23 13:28:35 -0500 )edit
notSoTechnical gravatar image notSoTechnical  ( 2019-09-23 13:29:04 -0500 )edit

I have Ubuntu 18.04 on a virtual machine

notSoTechnical gravatar image notSoTechnical  ( 2019-09-23 13:31:36 -0500 )edit
1

More detail: https://stackoverflow.com/questions/5...

you've cross-posted this question to SO within an hour of your post here on ROS Answers?

Sorry for the confusion. I have indigo...

[..]

I have Ubuntu 18.04 on a virtual machine

Which is it?

ROS Indigo only works on Ubuntu Trusty. ROS Melodic only works on Ubuntu Bionic.

You cannot have both.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-23 13:34:37 -0500 )edit

Hey I have melodic

notSoTechnical gravatar image notSoTechnical  ( 2019-09-23 23:19:59 -0500 )edit

Can you please show us the output of lsb_release -a and uname -a?

Hey I have melodic

please understand: 'melodic' is the name of a ROS release, not an Ubuntu release. Ubuntu is your OS (ie: a Linux distribution). ROS is "just" a set of programs that run on top of your OS. Compare with Windows: if I ask you which Windows version you have installed, you cannot answer with "I have Office 2016".

Now by circumstances, if you say "I have melodic", we can sort-of assume you are running Ubuntu Bionic as your OS. But we need to be sure. So please run the two commands I've asked you to run and show us what the output is.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-24 02:46:08 -0500 )edit

Hi! The output outputs of lsb_release -a and uname -a are:

notsotechnical@notsotechnical-VirtualBox:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:   bionic
notsotechnical@notsotechnical-VirtualBox:~$ uname -a
Linux notsotechnical-VirtualBox 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
notSoTechnical gravatar image notSoTechnical  ( 2019-09-24 13:43:19 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-09-24 14:06:43 -0500

gvdhoorn gravatar image

The output outputs of lsb_release -a and uname -a are:

notsotechnical@notsotechnical-VirtualBox:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:    18.04
Codename:   bionic
notsotechnical@notsotechnical-VirtualBox:~$ uname -a
Linux notsotechnical-VirtualBox 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

So you have Ubuntu Bionic (18.04) running in VirtualBox.

First: you cannot install ROS Indigo on Ubuntu Bionic (or at least, not easily, and I would not recommend it if you're just starting out).

So I'll assume you want to install ROS Melodic.

Did you follow the normal Melodic on Ubuntu installation tutorial? If so, please clarify why apt is attempting to download trusty package indices as seen in the apt output you posted:

Hit:6 http://packages.ros.org/ros/ubuntu trusty InRelease

Did you create this VM yourself? Was it perhaps configured for Trusty+Indigo and have you upgraded it to Ubuntu Bionic?

What is the output of:

cat /etc/apt/sources.list.d/ros-latest.list

If you've followed a regular install, this file should tell us which version of the package indices you've configured apt to download.

Additionally: in an earlier edit you showed this:

notsotechnical@notsotechnical-VirtualBox:~$ rosversion -d
Debian

this suggests that you have installed -- at one point -- the UpstreamPackages version of some ROS packages. See #q333234 for a similar question and why you get Debian as output.

In order for a regular ROS install to succeed, you'll have to remove those packages from your system first.

edit flag offensive delete link more

Comments

Hi Thank u! I think I have installed melodic and catkin, but I'm having trouble creating a string message in a ros package... Does it have anything to do with the Debian packages? https://answers.ros.org/question/3338...

notSoTechnical gravatar image notSoTechnical  ( 2019-09-24 17:43:25 -0500 )edit

I think I have installed melodic and catkin

how did you determine this?

I'm also slightly puzzled by your fixation on Catkin specifically. It will be installed as part of a regular ROS install, so no need to install that separately.

but I'm having trouble creating a string message in a ros package... Does it have anything to do with the Debian packages?

Please don't post questions in comments under (as of yet) unanswered questions.

Let's first make sure you have ROS properly installed.

What is the output of rosversion -d now? And do you have files in /opt/ros/melodic?

gvdhoorn gravatar image gvdhoorn  ( 2019-09-25 02:08:03 -0500 )edit

@gvdhoorn . It's a long story... I can't get Ubuntu 18.04 running anymore and I can't fix it... Anyway, I have indigo 64bit now from https://nootrix.com/downloads/#RosVM

I will keep you updated once I get Ubuntu 18.04working again

notSoTechnical gravatar image notSoTechnical  ( 2019-09-26 00:20:52 -0500 )edit

I have indigo 64bit now

please note that both Ubuntu Trusty and ROS Indigo are EOL and no longer supported.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-26 01:44:21 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-09-23 11:13:38 -0500

Seen: 6,126 times

Last updated: Sep 24 '19