LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 09-20-2006, 11:12 PM   #1
dishbert
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu
Posts: 7

Rep: Reputation: 0
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
 
Old 09-21-2006, 04:21 PM   #2
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 30
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.
 
Old 09-22-2006, 10:00 AM   #3
dishbert
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
Old 09-22-2006, 02:19 PM   #4
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 30
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).
 
Old 10-05-2006, 08:26 PM   #5
dishbert
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
Old 10-05-2006, 11:43 PM   #6
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 30
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!)

Last edited by pda_h4x0r; 10-05-2006 at 11:45 PM.
 
Old 10-06-2006, 12:47 AM   #7
grepper
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Rep: Reputation: 0
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
 
Old 10-06-2006, 03:26 AM   #8
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
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.
 
Old 10-07-2006, 10:42 AM   #9
dishbert
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
Old 10-07-2006, 10:58 AM   #10
dishbert
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
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?
 
Old 10-08-2006, 02:24 AM   #11
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 30
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).
 
Old 10-08-2006, 08:31 AM   #12
grepper
LQ Newbie
 
Registered: Oct 2006
Posts: 4

Rep: Reputation: 0
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
 
Old 10-08-2006, 10:04 AM   #13
dishbert
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
Old 10-08-2006, 09:58 PM   #14
dishbert
LQ Newbie
 
Registered: Sep 2006
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
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?
 
Old 10-08-2006, 10:02 PM   #15
pda_h4x0r
Member
 
Registered: Feb 2006
Location: somewhere in cyberspace
Distribution: Debian, Familiar
Posts: 380

Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Broken packages hraposo Debian 2 08-13-2006 01:55 PM
Broken packages mcnearcj Ubuntu 3 08-01-2006 01:56 PM
Apt-Get i need help fixing broken dependencies turkenator02 Suse/Novell 2 05-11-2006 04:36 AM
KDE 3.4 - any luck? broken? requirements? lefty.crupps MEPIS 5 06-29-2005 02:32 PM
fixing or reading a broken FAT partition ?? e1000 Linux - General 1 08-02-2004 01:37 PM


All times are GMT -5. The time now is 01:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration