Ask Your Question
0

ROS indigo Installation Dependency issue

asked 2018-12-11 23:31:58 -0600

rosusernli gravatar image

updated 2018-12-11 23:32:56 -0600

I am trying to install ROS Indigo in ubuntu 14.04.The link for installation is

http://wiki.ros.org/indigo/Installation/Ubuntu

When I give the following install command in my terminal

sudo apt-get install ros-indigo-desktop-full

the output messages i get is

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 python-rosdep : Depends: python-rosdistro (>= 0.4.0) but it is not going to be installed
 ros-indigo-desktop-full : Depends: ros-indigo-desktop but it is not going to be installed
                           Depends: ros-indigo-perception but it is not going to be installed
                           Depends: ros-indigo-simulators but it is not going to be installed
                           Depends: ros-indigo-urdf-tutorial but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

I tried

apt-get -f install

and got

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

So I tried with

sudo apt-get -f install

then i get an error

dpkg-deb: error: archive '/var/cache/apt/archives/python-rosdistro-modules_0.7.0-1_all.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/python-rosdistro-modules_0.7.0-1_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
dpkg-deb: error: archive '/var/cache/apt/archives/python-rosdistro_0.7.0-100_all.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/python-rosdistro_0.7.0-100_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/python-rosdistro-modules_0.7.0-1_all.deb
 /var/cache/apt/archives/python-rosdistro_0.7.0-100_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried sudo apt-get clean and sudo apt-get autoremove

I also tried several steps which i got from other forums

sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists/*
sudo rm /var/cache/apt/*.bin
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update
sudo dpkg --configure -a
sudo apt-get install -f

Nothing worked out.

Anybody have encountered or have an idea on how to solve this problem?

edit retag flag offensive close merge delete

Comments

has premature member 'control.tar.xz' before 'control.tar.gz', giving up

this seems to tell us that your dpkg is too old. Try running a sudo apt-get update && sudo apt-get upgrade dpkg. Then try again.

gvdhoorn gravatar imagegvdhoorn ( 2018-12-12 00:26:35 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-12-12 00:27:28 -0600

gvdhoorn gravatar image

This could be a duplicate of #q299091.

edit flag offensive delete link more

Comments

sudo apt-get update && sudo apt-get upgrade dpkg gives

python-rosdep : Depends: python-rosdistro (>= 0.4.0) but it is not installed
E: Unmet dependencies
rosusernli gravatar imagerosusernli ( 2018-12-12 06:20:22 -0600 )edit

It seems strange that an update of dpkg -- a base Debian package -- would result in errors about python-rosdep.

What is the general status of apt on your system?

Do you have "broken packages"?

gvdhoorn gravatar imagegvdhoorn ( 2018-12-12 06:50:41 -0600 )edit

Thanks for the tip. It worked !!!

I removed the broken and residual packages using sudo apt-get remove --purge $(sudo dpkg -l | grep "^iU" | awk '{print $2}' | tr '\n' ' ') and dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

I was able to do the dpkg upgrade and install

rosusernli gravatar imagerosusernli ( 2018-12-12 23:19:12 -0600 )edit
0

answered 2019-02-18 00:07:09 -0600

imanpakii gravatar image

I tried all the solution on this page none of them worked, even the last one. the last comment from @gvdhoorn inspired me to searched for remove broken package manually and I found this link: http://www.iasptk.com/ubuntu-fix-brok... I went to This file with "root" and do:

sudo nano /var/lib/dpkg/status    (you can use vim or gedit instead of nano)

Locate the corrupt package, and remove the whole block of information about it and save the file.

in my case I find the ros-indigo-pckg and remove all of them as it described to the above link.

after that I do

sudo apt-get autoremove -f

and after that

sudo apt-get update && sudo apt-get install dpkg

and then I start over the ROS -indigo installation tutorial.

and everything get fixed.

another easier solution is if you are able to install ubuntu again, and start fresh, before install the

sudo apt-get install ros-indigo-desktop-full

do this:

sudo apt-get update && sudo apt-get install dpkg

Thank you Iman

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

1 follower

Stats

Asked: 2018-12-11 23:31:58 -0600

Seen: 1,346 times

Last updated: Dec 12 '18