For example you are trying to install “nmap” on Ubuntu Desktop 10.04 … and you get this CRAP … And no matter what you do APT installer won’t shut up … and won’t install anything else. And it seems you cannot uninstall these myqsl things … Several other posts online failed to give enough information to fix this. But this one post did. First of all this is the situation as I was seeing it:
————————————————————————————————-
root@ka4udx-desktop:/var/spool# 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:
mysql-cluster-server-5.1: Depends: mysql-cluster-client-5.1 but it is not going to be installed
nmap: Depends: liblua5.1-0 but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
————————————————————————————————-
* And this is the link that helped me: https://answers.launchpad.net/ubuntu/+source/apt/+question/132645
* For those of you that DON’T CARE click Next now … everyone else keep going. This is an EXACT paste from my Terminal screen on the Ubuntu box showing when the problem cleared up. It may look like a jumbled mess … but it worked … and I was able to install NMAP with APT right at the end:
————————————————————————————————-
root@ka4udx-desktop:/usr/lib# ls -l *mysql*
ls: cannot access *mysql*: No such file or directory
root@ka4udx-desktop:/usr/lib# cd /var/spool/
root@ka4udx-desktop:/var/spool# ls
anacron cron cups exim4 mail openoffice plymouth
root@ka4udx-desktop:/var/spool# /usr/lib/libmysqlclient.so.16.0.0^C
root@ka4udx-desktop:/var/spool# ls /usr/var
ls: cannot access /usr/var: No such file or directory
root@ka4udx-desktop:/var/spool# ls /var/
backups crash lib lock mail run tmp
cache games local log opt spool www
root@ka4udx-desktop:/var/spool# ls /var/cache/
apache2 debconf gdm man software-center
apt dictionaries-common hald pm-utils
binfmts flashplugin-installer jockey pppconfig
cups fontconfig ldconfig samba
root@ka4udx-desktop:/var/spool# ls /var/cache/apt
archives pkgcache.bin srcpkgcache.bin
root@ka4udx-desktop:/var/spool# ls /var/cache/apt/archives/
lock
root@ka4udx-desktop:/var/spool# apt-get clean all
E: Archive directory /var/cache/apt/archives/partial is missing.
E: Unable to read /var/cache/apt/archives/partial/ – opendir (2: No such file or directory)
root@ka4udx-desktop:/var/spool# mkdir /var/cache/apt/archives/partial
root@ka4udx-desktop:/var/spool# apt-get clean all
root@ka4udx-desktop:/var/spool# apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.32-21 linux-headers-2.6.32-21-generic
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
mysql-cluster-client-5.1
Suggested packages:
libdbi-perl libdbd-mysql-perl
The following NEW packages will be installed:
mysql-cluster-client-5.1
0 upgraded, 1 newly installed, 0 to remove and 324 not upgraded.
2 not fully installed or removed.
Need to get 4,261kB of archives.
After this operation, 9,781kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/universe mysql-cluster-client-5.1 7.0.9-1ubuntu7 [4,261kB]
Fetched 4,261kB in 15s (268kB/s)
(Reading database … 175238 files and directories currently installed.)
Unpacking mysql-cluster-client-5.1 (from …/mysql-cluster-client-5.1_7.0.9-1ubuntu7_i386.deb) …
dpkg: error processing /var/cache/apt/archives/mysql-cluster-client-5.1_7.0.9-1ubuntu7_i386.deb (–unpack):
trying to overwrite ‘/usr/lib/libmysqlclient.so.16.0.0′, which is also in package libmysqlclient16 0:5.1.41-3ubuntu12.8
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Processing triggers for man-db …
Errors were encountered while processing:
/var/cache/apt/archives/mysql-cluster-client-5.1_7.0.9-1ubuntu7_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@ka4udx-desktop:/var/spool# apt-get clean all
root@ka4udx-desktop:/var/spool# 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:
mysql-cluster-server-5.1: Depends: mysql-cluster-client-5.1 but it is not going to be installed
nmap: Depends: liblua5.1-0 but it is not going to be installed
E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).
root@ka4udx-desktop:/var/spool# rm /var/lib/ap
apparmor/ apt/ aptitude/ apt-xapian-index/
root@ka4udx-desktop:/var/spool# rm /var/lib/apt/lists/lock
root@ka4udx-desktop:/var/spool# cp -arf /var/lib/dpkg /var/lib/dpkg;backup
^C
root@ka4udx-desktop:/var/spool# cp -arf /var/lib/dpkg /var/lib/dpkg.backup
^C
root@ka4udx-desktop:/var/spool# cp -arf /var/lib/dpkg /var/lib/dpkg.backup &
[1] 6528
root@ka4udx-desktop:/var/spool#
root@ka4udx-desktop:/var/spool#
root@ka4udx-desktop:/var/spool# cp /var/lib/dpkg/status-old /var/lib/dpkg/status[1]+ Done cp -arf /var/lib/dpkg /var/lib/dpkg.backup
root@ka4udx-desktop:/var/spool#
root@ka4udx-desktop:/var/spool#
root@ka4udx-desktop:/var/spool# cp /var/lib/dpkg/available-old /var/lib/dpkg/available
root@ka4udx-desktop:/var/spool# rm -rf /var/lib/dpkg/updates/*
root@ka4udx-desktop:/var/spool# rm -rf /var/lib/apt/lists/
root@ka4udx-desktop:/var/spool# mkdir /var/lib/apt/lists/partial
mkdir: cannot create directory `/var/lib/apt/lists/partial’: No such file or directory
root@ka4udx-desktop:/var/spool# mkdir /var/lib/apt/lists
root@ka4udx-desktop:/var/spool# mkdir /var/lib/apt/lists/partial
root@ka4udx-desktop:/var/spool# rm /var/cache/apt/*.bin
root@ka4udx-desktop:/var/spool# apt-get clean
root@ka4udx-desktop:/var/spool# apt-get autoclean
Reading package lists… Done
Building dependency tree
Reading state information… Done
root@ka4udx-desktop:/var/spool# apt-get –purge autoremove
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:
mysql-cluster-server-5.1: Depends: mysql-cluster-client-5.1 but it is not installable
E: Unmet dependencies. Try using -f.
root@ka4udx-desktop:/var/spool# apt-get –purge autoremove
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:
mysql-cluster-server-5.1: Depends: mysql-cluster-client-5.1 but it is not installable
E: Unmet dependencies. Try using -f.
root@ka4udx-desktop:/var/spool# apt-get -f install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.32-21 linux-headers-2.6.32-21-generic
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
mysql-cluster-server mysql-cluster-server-5.1
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 64.1MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database … 175237 files and directories currently installed.)
Removing mysql-cluster-server …
Removing mysql-cluster-server-5.1 …
Processing triggers for install-info …
Processing triggers for man-db …
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
root@ka4udx-desktop:/var/spool# apt-get install nmap
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Couldn’t find package nmap
root@ka4udx-desktop:/var/spool# apt-get update
Get:1 http://security.ubuntu.com lucid-security Release.gpg [198B]
Ign http://security.ubuntu.com/ubuntu/ lucid-security/main Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/restricted Translation-en_US
Get:2 http://us.archive.ubuntu.com lucid Release.gpg [189B]
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/restricted Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/universe Translation-en_US
Ign http://security.ubuntu.com/ubuntu/ lucid-security/multiverse Translation-en_US
Get:3 http://security.ubuntu.com lucid-security Release [57.3kB]
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid/multiverse Translation-en_US
Get:4 http://us.archive.ubuntu.com lucid-updates Release.gpg [198B]
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com/ubuntu/ lucid-updates/multiverse Translation-en_US
Get:5 http://us.archive.ubuntu.com lucid Release [57.2kB]
Get:6 http://us.archive.ubuntu.com lucid-updates Release [57.3kB]
Get:7 http://security.ubuntu.com lucid-security/main Packages [376kB]
Get:8 http://us.archive.ubuntu.com lucid/main Packages [1,386kB]
Get:9 http://security.ubuntu.com lucid-security/restricted Packages [14B]
Get:10 http://security.ubuntu.com lucid-security/main Sources [118kB]
Get:11 http://security.ubuntu.com lucid-security/restricted Sources [14B]
Get:12 http://security.ubuntu.com lucid-security/universe Packages [117kB]
Get:13 http://security.ubuntu.com lucid-security/universe Sources [34.5kB]
Get:14 http://us.archive.ubuntu.com lucid/restricted Packages [6,208B]
Get:15 http://us.archive.ubuntu.com lucid/main Sources [659kB]
Get:16 http://security.ubuntu.com lucid-security/multiverse Packages [4,561B]
Get:17 http://security.ubuntu.com lucid-security/multiverse Sources [1,760B]
Get:18 http://us.archive.ubuntu.com lucid/restricted Sources [3,775B]
Get:19 http://us.archive.ubuntu.com lucid/universe Packages [5,448kB]
Get:20 http://us.archive.ubuntu.com lucid/universe Sources [3,165kB]
Get:21 http://us.archive.ubuntu.com lucid/multiverse Packages [180kB]
Get:22 http://us.archive.ubuntu.com lucid/multiverse Sources [119kB]
Get:23 http://us.archive.ubuntu.com lucid-updates/main Packages [568kB]
Get:24 http://us.archive.ubuntu.com lucid-updates/restricted Packages [3,994B]
Get:25 http://us.archive.ubuntu.com lucid-updates/main Sources [215kB]
Get:26 http://us.archive.ubuntu.com lucid-updates/restricted Sources [1,834B]
Get:27 http://us.archive.ubuntu.com lucid-updates/universe Packages [254kB]
Get:28 http://us.archive.ubuntu.com lucid-updates/universe Sources [92.8kB]
Get:29 http://us.archive.ubuntu.com lucid-updates/multiverse Packages [10.5kB]
Get:30 http://us.archive.ubuntu.com lucid-updates/multiverse Sources [5,057B]
Fetched 12.9MB in 39s (324kB/s)
Reading package lists… Done
root@ka4udx-desktop:/var/spool# apt-get install nmap
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.32-21 linux-headers-2.6.32-21-generic
Use ‘apt-get autoremove’ to remove them.
The following extra packages will be installed:
liblua5.1-0
The following NEW packages will be installed:
liblua5.1-0 nmap
0 upgraded, 2 newly installed, 0 to remove and 324 not upgraded.
Need to get 1,671kB of archives.
After this operation, 6,541kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ lucid/main liblua5.1-0 5.1.4-5 [82.2kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ lucid/main nmap 5.00-3 [1,589kB]
Fetched 1,671kB in 6s (269kB/s)
Selecting previously deselected package liblua5.1-0.
(Reading database … 175030 files and directories currently installed.)
Unpacking liblua5.1-0 (from …/liblua5.1-0_5.1.4-5_i386.deb) …
Selecting previously deselected package nmap.
Unpacking nmap (from …/archives/nmap_5.00-3_i386.deb) …
Processing triggers for man-db …
Setting up liblua5.1-0 (5.1.4-5) …
Setting up nmap (5.00-3) …
Processing triggers for libc-bin …
ldconfig deferred processing now taking place
root@ka4udx-desktop:/var/spool#
————————————————————————————————-
* and that’s it. This is just me giving back to the community – in case anyone else is looking to fix this same problem.
—
Alan Spicer
http://www.marinetelecom.net and http://www.wifiyacht.net
+1 954-683-3426
communications @ marinetelecom.net