1

I keep trying to install nmap and getting an error returned...

Can anyone please help?

root@cola:~# apt-get install nmap -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  debian-archive-keyring
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  gcc-7-base libblas3 libc-bin libc-l10n libc6 libgcrypt20 libgfortran4
  libgpg-error0 liblinear3 liblua5.3-0 libquadmath0 libssh2-1 libssl1.1
  libstdc++6 libxslt1.1 locales ndiff nmap-common python-bs4 python-html5lib
  python-lxml python-pkg-resources python-webencodings
Suggested packages:
  glibc-doc rng-tools liblinear-tools liblinear-dev zenmap python-genshi
  python-lxml-dbg python-lxml-doc python-setuptools
The following NEW packages will be installed:
  gcc-7-base libblas3 libc-l10n libgcrypt20 libgfortran4 liblinear3
  liblua5.3-0 libquadmath0 libssh2-1 libssl1.1 libxslt1.1 ndiff nmap
  nmap-common python-bs4 python-html5lib python-lxml python-pkg-resources
  python-webencodings
The following packages will be upgraded:
  libc-bin libc6 libgpg-error0 libstdc++6 locales
5 upgraded, 19 newly installed, 0 to remove and 393 not upgraded.
Need to get 0 B/19.2 MB of archives.
After this operation, 47.1 MB of additional disk space will be used.
Preconfiguring packages ...
dpkg-deb: error: archive '/var/cache/apt/archives/locales_2.25-2_all.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/locales_2.25-2_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
dpkg-deb: error: archive '/var/cache/apt/archives/libc-l10n_2.25-2_all.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/libc-l10n_2.25-2_all.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
dpkg-deb: error: archive '/var/cache/apt/archives/libc6_2.25-2_amd64.deb' has premature member 'control.tar.xz' before 'control.tar.gz', giving up
dpkg: error processing archive /var/cache/apt/archives/libc6_2.25-2_amd64.deb (--unpack):
 subprocess dpkg-deb --control returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/locales_2.25-2_all.deb
 /var/cache/apt/archives/libc-l10n_2.25-2_all.deb
 /var/cache/apt/archives/libc6_2.25-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@cola:~#
Zanna
  • 72,312

1 Answers1

2

According this post clean-up cache, you need to clean up cache stored by apt. also you need to upgrade your installed software to latest version.

Removing APT cache

sudo apt clean && sudo apt autoclean

Updating APT

sudo apt update

If there's available software to upgrade then run

sudo apt upgrade

then you can continue installing nmap

sudo apt install nmap

Hope this work for you.

ryuffhant
  • 541