PDA

View Full Version : Dealing with broken packages\dependency problems in Linux



Agent_24
18-10-2013, 04:00 PM
I just had to deal with broken package issues after trying to install LinuxSampler from their provided .deb packages using dpkg -i command (which I guess may have been the problem)

dpkg suggested using apt-get -f install to resolve the issue but it wasn't able to correct the problem.

I fixed the problem by removing the offending packages with Synaptic package manager; it had no complaints doing the job.


What is the 'right' way to fix these problems via terminal if\when Synaptic is not available?

Chilling_Silence
18-10-2013, 04:13 PM
Depends on the error. Try reinstall and copy / paste the error?

Agent_24
18-10-2013, 04:46 PM
Error while installing:

agent24@ubuntu:~/Downloads/LinuxSampler$ sudo dpkg -i *.deb[sudo] password for agent24:
Selecting previously unselected package gigedit:i386.
(Reading database ... 172227 files and directories currently installed.)
Unpacking gigedit:i386 (from gigedit_0.2.0-1_i386.deb) ...
Selecting previously unselected package gigtools:i386.
Unpacking gigtools:i386 (from gigtools_3.3.0-1_i386.deb) ...
Selecting previously unselected package libgig6:i386.
Unpacking libgig6:i386 (from libgig6_3.3.0-1_i386.deb) ...
Selecting previously unselected package libgig-dev:i386.
Unpacking libgig-dev:i386 (from libgig-dev_3.3.0-1_i386.deb) ...
Selecting previously unselected package liblinuxsampler:i386.
Unpacking liblinuxsampler:i386 (from liblinuxsampler_1.0.0-1_i386.deb) ...
Selecting previously unselected package liblinuxsampler-dev:i386.
Unpacking liblinuxsampler-dev:i386 (from liblinuxsampler-dev_1.0.0-1_i386.deb) ...
Unpacking liblscp:i386 (from liblscp_0.5.6-1_i386.deb) ...
Selecting previously unselected package liblscp-dev:i386.
Unpacking liblscp-dev:i386 (from liblscp-dev_0.5.6-1_i386.deb) ...
Selecting previously unselected package linuxsampler:i386.
Unpacking linuxsampler:i386 (from linuxsampler_1.0.0-1_i386.deb) ...
Selecting previously unselected package qsampler:i386.
Unpacking qsampler:i386 (from qsampler_0.2.2-1_i386.deb) ...
Setting up libgig6:i386 (3.3.0-1) ...
Setting up libgig-dev:i386 (3.3.0-1) ...
dpkg: dependency problems prevent configuration of liblinuxsampler:i386:
liblinuxsampler:i386 depends on libjack0 (>= 0.109.2).
dpkg: error processing liblinuxsampler:i386 (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of liblinuxsampler-dev:i386:
liblinuxsampler-dev:i386 depends on liblinuxsampler (= 1.0.0-1); however:
Package liblinuxsampler:i386 is not configured yet.
dpkg: error processing liblinuxsampler-dev:i386 (--install):
dependency problems - leaving unconfigured
Setting up liblscp:i386 (0.5.6-1) ...
Setting up liblscp-dev:i386 (0.5.6-1) ...
dpkg: dependency problems prevent configuration of linuxsampler:i386:
linuxsampler:i386 depends on liblinuxsampler; however:
Package liblinuxsampler:i386 is not configured yet.
dpkg: error processing linuxsampler:i386 (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of qsampler:i386:
qsampler:i386 depends on libqt4-core (>= 4.3.4).
qsampler:i386 depends on libqt4-gui (>= 4.3.4).
dpkg: error processing qsampler:i386 (--install):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gigedit:i386:
gigedit:i386 depends on liblinuxsampler; however:
Package liblinuxsampler:i386 is not configured yet.
dpkg: error processing gigedit:i386 (--install):
dependency problems - leaving unconfigured
Setting up gigtools:i386 (3.3.0-1) ...
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 3 added doc-base files...
Registering documents with scrollkeeper...
Processing triggers for desktop-file-utils ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
liblinuxsampler:i386
liblinuxsampler-dev:i386
linuxsampler:i386
qsampler:i386
gigedit:i386
agent24@ubuntu:~/Downloads/LinuxSampler$


Problem when trying to manually remove one of the packages:

agent24@ubuntu:~/Downloads/LinuxSampler$ sudo apt-get remove linux
linux-firmware linux-headers-3.2.0-55-generic linux-image-generic linux-sound-base
linux-generic linux-headers-generic linux-libc-dev
linux-headers-3.2.0-55 linux-image-3.2.0-55-generic linuxsampler
agent24@ubuntu:~/Downloads/LinuxSampler$ sudo apt-get remove linuxsampler
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linuxsampler:i386 is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
gigedit:i386 : Depends: liblinuxsampler:i386 but it is not installable
qsampler:i386 : Depends: liblscp:i386 but it is not installable
Depends: libqt4-core:i386 (>= 4.3.4) but it is not going to be installed
Depends: libqt4-gui:i386 (>= 4.3.4) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Problem trying to use recommended command to fix issues:

agent24@ubuntu:~/Downloads/LinuxSampler$ 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:
gigedit:i386 liblscp6:i386 qsampler:i386
The following packages will be REMOVED
liblinuxsampler:i386 liblinuxsampler-dev:i386 liblscp:i386 liblscp-dev:i386 linuxsampler:i386
The following NEW packages will be installed
liblscp6:i386
The following packages will be upgraded:
gigedit:i386 qsampler:i386
2 upgraded, 1 newly installed, 5 to remove and 3 not upgraded.
5 not fully installed or removed.
Need to get 1,223 kB of archives.
After this operation, 48.9 MB disk space will be freed.
Do you want to continue [Y/n]? Y
Get:1 http://gb.archive.ubuntu.com/ubuntu/ precise/universe gigedit i386 0.2.0-1 [909 kB]
Get:2 http://gb.archive.ubuntu.com/ubuntu/ precise/universe qsampler i386 0.2.2-5 [282 kB]
Get:3 http://gb.archive.ubuntu.com/ubuntu/ precise/universe liblscp6 i386 0.5.6-2 [31.4 kB]
Fetched 1,223 kB in 8s (147 kB/s)
(Reading database ... 173009 files and directories currently installed.)
Removing linuxsampler:i386 ...
Removing liblinuxsampler-dev:i386 ...
Removing liblinuxsampler:i386 ...
Removing liblscp-dev:i386 ...
Removing liblscp:i386 ...
Processing triggers for man-db ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for doc-base ...
Processing 2 removed doc-base files...
Registering documents with scrollkeeper...
Selecting previously unselected package liblscp6:i386.
(Reading database ... 172530 files and directories currently installed.)
Unpacking liblscp6:i386 (from .../liblscp6_0.5.6-2_i386.deb) ...
dpkg: dependency problems prevent configuration of gigedit:i386:
gigedit:i386 depends on liblinuxsampler; however:
Package liblinuxsampler:i386 is not installed.
dpkg: error processing gigedit:i386 (--configure):
dependency problems - leaving unconfigured
Setting up liblscp6:i386 (0.5.6-2) ...
dpkg: dependency problems prevent configuration of qsampler:i386:
qsampler:i386 depends on liblscp; however:
Package liblscp:i386 is not installed.
qsampler:i386 depends on libqt4-core (>= 4.3.4); however:
qsampler:i386 depends on libqt4-gui (>= 4.3.4); however:
dpkg: error processing qsampler:i386 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
gigedit:i386
qsampler:i386
E: Sub-process /usr/bin/dpkg returned an error code (1)


So basically after that, trying to remove or install anything via command line apt-get or dpkg results in errors and nothing can be done. Until the packages are removed with Synaptic.

Rod J
18-10-2013, 05:50 PM
Try sudo apt-get autoremove. What does that report?

Another thing to try might be: sudo dpkg --remove linuxsampler

Rod J
18-10-2013, 06:13 PM
If you want to try re-installing LinuxSampler try installing the dependency libjack0 first from the repository (that seems to be what broke the apt install to begin with).

Agent_24
18-10-2013, 06:57 PM
Ah, this is where it gets even more fun, then. I can't install libjack0 because it wants to remove other packages


The following packages will be REMOVED
gstreamer0.10-plugins-good:i386 ia32-libs ia32-libs-multiarch:i386 jackd2
jackd2-firewire libasound2-plugins:i386 libjack-jackd2-0
libjack-jackd2-0:i386
The following NEW packages will be installed
jackd1 jackd1-firewire libjack0

Which would break a number of things, including Blender and Fluidsynth

Rod J
18-10-2013, 07:12 PM
Ah, welcome to dependency hell! :groan:

The thing that makes me think you probably can't install this from the downloaded package is because it's quite old (Sept. 2009 for Ubuntu 8.04 LTS, a.k.a "Hardy Heron"). You might have better luck installing it from the source code but that would probably run into a whole lot more problems. I've compiled packages in the past but I've always found it to be a tedious and frustrating exercise. When I returned to Linux some years ago I decided to only install stuff from the repositories or downloaded debs and avoid compiling anything. I've only had to resort to compiling from source a couple of times in the last three years for apps that I really wanted (fcron and yawp (latest version)).

Chilling_Silence
18-10-2013, 07:21 PM
It doesn't look like that package was actually built for your distro?

Agent_24
18-10-2013, 08:45 PM
You may well be right. I found the packages through this link: http://download.linuxsampler.org/packages/ubuntu/ and didn't think much of the 2009 datestamp.

I'll try building from source and see what happens...