Help fixing apt-get

3 respostas [Última entrada]
cuco.saa
Desconectado
Joined: 04/25/2014

I've seem to have broken my package manager. This is what I get when I try to install any package (in this case gcc, just to illustrate an example):
$ sudo apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
gcc is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
bluez-alsa : Breaks: bluez-alsa:i386 (!= 4.98-2ubuntu7.1) but 4.98-2ubuntu7 is to be installed
bluez-alsa:i386 : Depends: libasound2:i386 (>= 1.0.23) but it is not going to be installed
Breaks: bluez-alsa (!= 4.98-2ubuntu7) but 4.98-2ubuntu7.1 is to be installed
ia32-libs-multiarch:i386 : Depends: libasound2:i386 but it is not going to be installed
libasound2-plugins:i386 : Depends: libasound2:i386 (>= 1.0.25) but it is not going to be installed
libcanberra0:i386 : Depends: libasound2:i386 (>= 1.0.23) but it is not going to be installed
libesd0:i386 : Depends: libasound2:i386 (>= 1.0.23) but it is not going to be installed
libsdl1.2debian:i386 : Depends: libasound2:i386 (>= 1.0.23) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

When I run apt-get -f install I get the following:
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
linux-image-3.13.7-gnu
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
bluez-alsa:i386 libasound2:i386
Suggested packages:
libasound2-python:i386
The following NEW packages will be installed:
libasound2:i386
The following packages will be upgraded:
bluez-alsa:i386
1 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
14 not fully installed or removed.
Need to get 0 B/564 kB of archives.
After this operation, 1,407 kB of additional disk space will be used.
Do you want to continue [Y/n]?

I answer Y, and get the following:
(Reading database ... 394225 files and directories currently installed.)
Unpacking libasound2:i386 (from .../libasound2_1.0.25-1ubuntu10.2_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libasound2_1.0.25-1ubuntu10.2_i386.deb (--unpack):
'./usr/share/alsa/ucm/DAISY-I2S/HiFi.conf' is different from the same file on the system
No apport report written because MaxReports is reached already
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libasound2_1.0.25-1ubuntu10.2_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I downloaded, built and installed the latest alsa-lib source, but that didn't change anything.

BugRep
Desconectado
Joined: 04/05/2012

You can try removing some packages:
sudo apt-get remove bluez-alsa:i386 libasound2:i386
sudo apt-get -f install

You seem to have amd64 architecture, but tried to install i386 packages. This can sometimes create problems.
If I am wrong and apt-get tries to remove a lot of packages, just abort the removal.

Sometimes using aptitude can help. It suggests and executes fixes for this kind of problems, but may not be useful at all in some situations.

GustavoCM

I am a member!

Desconectado
Joined: 11/20/2012

"You seem to have amd64 architecture, but tried to install i386 packages. This can sometimes create problems."

Try:

$ sudo rm /etc/dpkg/dpkg.cfg.d/multiarch

then remove any :i386 package...

mYself
Desconectado
Joined: 01/18/2012

First off, remove the manually built alsa-lib binaries by issuing "sudo make uninstall" from the source folder. If the /usr/share/alsa/ucm/DAISY-I2S/HiFi.conf file still exist, run

sudo mv /usr/share/alsa/ucm/DAISY-I2S/HiFi.conf /usr/share/alsa/ucm/DAISY-I2S/HiFi.conf-backup

and try repeating the process described in your initial comment. If none of these help, try removing multi-arch with the instructions contained here. Also, don't forget to remove the /usr/share/alsa/ucm/DAISY-I2S/HiFi.conf-backup file once your system is fixed.