0

I've seen a number of questions with similar "error updating ____" but none of the fixes for those problems have helped me any.
I'm still very new to the Pi, and Linux-based operating systems in general, so I'm hoping this will be a reasonably simple issue.
I am trying to install the package nmap but it fails due to unmet dependencies.

pi@cympi:~ $ sudo apt-get install nmap
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:
 libsmbclient : Depends: samba-libs (= 2:4.2.14+dfsg-0+deb8u9) but 
2:4.2.10+dfsg-0+deb8u3 is to be installed
 nmap : Depends: liblinear1 (>= 1.6) but it is not going to be installed
    Depends: liblua5.2-0 but it is not going to be installed
    Depends: libpcap0.8 (>= 0.9.8) but it is not going to be installed
    Recommends: ndiff but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify 
a solution).

So I follow the instructions to use sudo apt-get -f install but then that gives me this:

pi@cympi:~ $ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  samba-libs
The following packages will be upgraded:
  samba-libs
1 upgraded, 0 newly installed, 0 to remove and 111 not upgraded.
6 not fully installed or removed.
Need to get 0 B/4,248 kB of archives.
After this operation, 10.2 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 121840 files and directories currently installed.)
Preparing to unpack .../samba-libs_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb ...
Unpacking samba-libs:armhf (2:4.2.14+dfsg-0+deb8u9) over (2:4.2.10+dfsg-
0+deb8u3    ) ...
dpkg-deb (subprocess): decompressing archive member: lzma error: compressed 
data     is corrupt
dpkg-deb: error: subprocess <decompress> returned error exit status 2
dpkg: error processing archive /var/cache/apt/archives/samba-
libs_2%3a4.2.14+dfs    g-0+deb8u9_armhf.deb (--unpack):
 cannot copy extracted data for './usr/lib/arm-linux-
gnueabihf/samba/liblibsmb.s    o.0' to '/usr/lib/arm-linux-
gnueabihf/samba/liblibsmb.so.0.dpkg-new': unexpected     end of file or 
stream
Errors were encountered while processing:
 /var/cache/apt/archives/samba-libs_2%3a4.2.14+dfsg-0+deb8u9_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Aaaaand at this point I'm totally lost. I tried uninstalling the samba-libs package to then try reinstalling it, but it won't even let me remove it because of unmet dependencies. Any and all assistance will be most welcome. The Pi is running Raspbian; presumably, the most recent version. Also, this is basically the first thing I've tried to do since I took the Pi out of it's box, although I did use sudo apt-get update and sudo apt-get upgrade first. Thanks

  • If you want any sensible help you need to enter what you typed - in full, as well as error messages. What OS are you using? Have you run sudo apt update ? – Milliways Dec 27 '17 at 2:45
  • Yes, sorry, I just added that I have tried update. I certainly want sensible help, sir. I'll try to update my initial post with some of that info. Thanks – CCramer Dec 27 '17 at 2:47
  • 1
    You seem to have a number (111) of upgradable packages - I guess you have not done an upgrade. The error suggests a broken package. Try sudo apt-get clean to empty cache and try install again. – Milliways Dec 27 '17 at 3:10
  • Should I try installing that package by itself after sudo apt-get clean? I have done an upgrade. Also..should there be some output to the sudo apt-get clean command? It just sent me down to the next line after using that. – CCramer Dec 27 '17 at 3:11
  • Yay that fixed it! It made me do sudo apt-get -f install again, and then I was able to use sudo apt-get install nmap and it all processed perfectly! Do you wanna move that into an official answer so I can give you credit for your assistance? Why did that work, by the way? What is this "cache" that I emptied with sudo apt-get clean? – CCramer Dec 27 '17 at 3:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.