LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   No luck fixing broken packages (https://www.linuxquestions.org/questions/ubuntu-63/no-luck-fixing-broken-packages-485521/)

dishbert 09-20-2006 11:12 PM

No luck fixing broken packages
 
I'm using Ubuntu 5.10.

Synaptic gives me a "You have 6 broken packages" when I flash it up, but "edit - fix broken packages" tells me that 1256 packages including "24 essencial packages" will be removed if I proceed.

How is this possible? I tried unsuccessfully to install 6 non-Ubuntu Debian packages, and I can isolate them, but when I ask Synaptic to remove them completely, I get the same "1256 packages" message.

How should I proceed? I have yet to upgrade to Dapper, would that help?

I'd just ignore the messages but I think they're the reason I'm unable to install python-serial. When I run apt-get install python-serial, I get a message about problems with my 6 problem packages.

dishbert

pda_h4x0r 09-21-2006 04:21 PM

Open up a terminal, type in "sudo apt-get -f install," and tell us EXACTLY what is spat out. Don't do anything that would cause the removal of essential packages.

dishbert 09-22-2006 10:00 AM

When I do that this morning I get:

Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following packages will be REMOVED:
acpi acpi-support acpid adduser adept akode akregator alsa-base alsa-utils
amarok amarok-gstreamer anacron apmd appres apt apt-file apt-utils aptitude
ark arts artsbuilder aspell aspell-en at autoconf automake1.9 base-config


There are many, many lines of packages that will be REMOVED.

At the bottom is this:

0 upgraded, 0 newly installed, 1256 to remove and 12 not upgraded.
4 not fully installed or removed.
Need to get 0B of archives.
After unpacking 2211MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]

I'm just headed out the door on holidays for a couple of weeks, but if you reply, I'll get back to it when next I'm home.

pda_h4x0r 09-22-2006 02:19 PM

Okay, two of your non-Ubuntu packages were installed, it seems--only four of them have not been completely installed or removed. The two other ones that installed successfully you should leave alone (by attempting to remove these, you may be causing the removal of those 1256 other packages). You can find out which ones did NOT install correctly by typing in "sudo dpkg --yet-to-unpack." These ones you should be able to safely removed ("sudo apt-get remove <packages...>", where <packages...> are the aforementioned packages).

dishbert 10-05-2006 08:26 PM

Just back from a great 2 weeks of camping in Alberta, and raring to go with Linux again.

I tried your "sudo dpkg --yet-to-unpack" command, but get nothing returned:

chris@downstairs:~$ sudo dpkg --yet-to-unpack
chris@downstairs:~$

Is there another way to identify the offending packages? Synaptic says I have 6 broken packages and suggests I use the Broken filter to find them, but I can't seem to get that to find them either.

pda_h4x0r 10-05-2006 11:43 PM

Okay, then try "dpkg -C". This will list which packages are only partly installed. The previous command I recommended only applied to packages that haven't been unpacked yet...the problematic packages, however, seem to be unpacked already but not configured.

Unfortunately, even though Ubuntu shares Debian's core software, their packages are not guaranteed to be compatible with one another :(, and problems like this usually result when you try to mix them (for example, I tried to install Ubuntu's compiz packages and removed my X Window System in the process!)

grepper 10-06-2006 12:47 AM

Since apt-get is tied up with the problem right now, you will have to use dpkg from the command line.

Code:

sudo dpkg --force-depends --purge package1 package2 package3
etc etc

Then see if
Code:

sudo apt-get -f install
is happy.

If not, then you probably missed one or two packages.
rinse, and repeat.

hth,
grepper

reddazz 10-06-2006 03:26 AM

Moved: This thread is more suitable in the Ubuntu Forum and has been moved accordingly to help your thread/question get the exposure it deserves.

dishbert 10-07-2006 10:42 AM

Ok, I can report some success, but also a new problem.

pda_h4x0r's suggestion to use "dkpg -C" showed 4 packages, and grepper's suggestion to use "sudo dpkg --force-depends --purge package1 package2 package3" successfully removed 3 of them:

kimdaba, escputil, libread5 (I think those were the ones, spelling may be incorrect) but the last one libc6 gave messages about many many dependencies, and then this:

(Reading database ... 84945 files and directories currently installed.)
Removing libc6 ...
dpkg - warning: while removing libc6, unable to remove directory `/sys': Device or resource busy - directory may be a mount point ?
dpkg (subprocess): unable to execute post-removal script: No such file or directory
dpkg: error processing libc6 (--purge):
subprocess post-removal script returned error exit status 2
Errors were encountered while processing:
libc6


Now when I do sudo apt=get -f install

I get bash: /usr/bin/sudo: No such file or directory

and Synaptic won't launch with the message: Details: Failed to execute child process "gksudo" (No such file or directory)

Oh Oh.

dishbert 10-07-2006 10:58 AM

Since I posted a few minutes ago, I wasn't able to do much of anything in Linux.

I tried to reboot, but even that failed. I hard booted, but got a kernel panic message about not synching because of no init.

Yikes! Looks like I'm stuck here in Windoze-land until I can get this sorted out. Or am I looking at a complete reinstall?

pda_h4x0r 10-08-2006 02:24 AM

NEVER, EVER, EVER remove libc6. This library is responsible for a good chunk of the app/kernel interfacing (i.e. every program except the kernel requires it to run). You could, in theory, boot from a liveCD, download the libc6 .deb file and install it on your main system, but I have never attempted this before and don't even know if it is easily done (or completely possible).

grepper 10-08-2006 08:31 AM

Wow.
Guess it always helps to qualify advice better for newbies. The dpkg --purge was for the few packages you installed from debian rather than from the ubuntu repository. Hopefully libc6 was not one of them, that would have been silly.

As pda_h4x0r has pointed out, libc6 is a major system library ( the C libs ) and you are in major trouble without it.

To unpack a deb the command is dpkg-deb -X foo.deb (in an empty directory), and files paths start at the root dir / , if you want to try his suggestion of a liveCD and copy the files you need over.

It is possible that someone that knows what they are doing could fix this depending on how many and which other packages you removed, but as a newbie you are probably better off saving your personal data and reinstalling.

Using --force-depends is always dangerous. If you mistakenly installed a package that ties up apt it is sometimes the only way to fix things. You just took things a little too far, and perhaps mistakenly put together 2 bits of advice from different posters.

good luck,
grepper

dishbert 10-08-2006 10:04 AM

Reinstall it is then, I'm not that concerned about it actually as I have recent backups of most things, and I find it's always good to do low level format every few years.

How would I go about finding my Epiphany bookmarks and my Thunderbird inbox and address book after I boot to a live CD?

I know I have lots of new items there since my last backup.

dishbert 10-08-2006 09:58 PM

Ok, I used gparted to create an ext3 partion on my 2nd hard drive and copied all my 5.10 directories over there so I can restore my Thunderbird and Epiphany stuff once I find out where it's stored.

I tried to install 6.06 and the disk boots fine, but my Viewsonic VX2025wm LCD monitor gives an "out of range" message even if I use "Safe Graphics Mode". I get the same result using both a downloaded Ubuntu 6.06 install CD and the Linux Format magazine Live DVD. My 5.10 Live CD works just fine.

I have an ATI Radeon 9200SE card that's always worked fine with Linux.

Would it help to dig out my old CRT monitor?

pda_h4x0r 10-08-2006 10:02 PM

These'll be in your /home directory, under your user name. In fact, if you have space somewhere, just use the liveCD to back up the entire /home directory and restore it on your new install.


All times are GMT -5. The time now is 11:46 PM.