Solved

Dependencies Problem - need to install dpkg and dselect (debain, apt-get)

Posted on 2003-10-24
9
566 Views
Last Modified: 2011-09-20
Long story made short. I was trying to install spamassassian (a anti-spam software). Somewhere along the line I killed my email (sendmail) altogether. Then for an incredible unconscious act, I uninstall exim (dpkg exim --purge -force-) trying to fix sendmails problem. From this point on I am have dependencies problems with dpkg, dselect and many more I am sure.

I am on a debian 3.0 linux box. I have been trying to use apt-get to reinstall dpkg and dselect. When I run the command:

apt-get install dpkg

I get this error:

Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these:
Sorry, but the following packages have unmet dependencies:
  dpkg: PreDepends: dselect 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 install dselect

I get this error:

Reading Package Lists... Done
Building Dependency Tree... Done
You might want to run `apt-get -f install' to correct these:
Sorry, but the following packages have unmet dependencies:
  apache: Depends: dpkg (> 1.9.0) but it is not going to be installed
  man-db: Depends: dpkg (>= 1.4.1.17) but it is not going to be installed
  spamassassin: Depends: dpkg (>= 1.8.1) but it is not going to be installed
  sysvinit: Depends: dpkg (>= 1.4.0.21) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


I have also tried the command:

apt-get -f install

And I get these errors:

Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
  dpkg dselect
The following NEW packages will be installed:
  dpkg dselect
0 packages upgraded, 2 newly installed, 0 to remove and 2  not upgraded.
Need to get 0B/1227kB of archives. After unpacking 3686kB will be used.
Do you want to continue? [Y/n] y
Could not exec dpkg!
E: Sub-process /usr/bin/dpkg returned an error code (100)

So, is there any hope for me? I do have an experience Linux guy(I am not) working on this, but he too is a bit lost on how to solve this catch 22. I have search the net for days, but know one really seems to have messed up their Linux box as bad as I have.

Please help!

Bill




0
Comment
Question by:waffe
  • 5
  • 4
9 Comments
 
LVL 1

Expert Comment

by:linux_geek
ID: 9620253
Can you install the packages you need off your install CD?
Even if they are not the most up to date, it might get you up and running again.

dpkg and dselect should be standard on an install CD I would have thought. So try running their repair utility (if there is one).
0
 

Author Comment

by:waffe
ID: 9620383
Does not look like I can mount my cdrom drive anymore. I am looking though the disk on my win box. What would the repair utility be called?

I also went to debian.org and downloaded dpkg and tried to install it, but of course I need dpkg to install dpkg. Say WHAT!
0
 
LVL 1

Expert Comment

by:linux_geek
ID: 9620435
oooh. That sounds like you've entered infinite loop dependency hell!

have you tried

apt-get dpkg dselect

Have you tried using the --force option with the above?


I don't think it'll work, but it's worth a try. Have you tried copying the dpkg and dselect to a floppy? I don't see why your CD-Drive won't mount :-/  what error do you get? Mind you 'sysvinit' looks pretty important!

Hmmm if you cannot mount any external drives, can you mount your windows partition? Can you put the data on your windows partition and copy it across?


I am not a debian user, so I am not sure about a repair utility... a quick look through google doesn't give much about a command line repair utility. If it works similarly to SuSE, you boot off your install CD and you can select 'repair' as one of the options after you select 'install', and it should go through and check your packages for you. If that doesn't work, backup your data and go through and do an 'install' but don't let it format anything (i.e.not a new install)- that should fix it!

By the way, WHY did you do that with --purge ? It must have uninstalled everything which depended on exim! !!!


0
 

Author Comment

by:waffe
ID: 9620809
Yes, I have tried:

apt-get install dpkg
apt-get install dselect
apt-get -f install

Look at my 1st post to see the error that go along with these commands.

I might be doing something wrong with the cd mount, but ftp works so I can transfer data that way.

I will try to boot of the cd and see if I can find the repair section.

I used --purge because I was getting errors that said I could not uninstall it. LOL! Like a dumb a$$ those errors were telling me it was going to uninstall critical programs.

I am using sendmail, and after I installed Spamassassin sendmail stopped working. I found evidence that exim was interfering with sendmail and Spamassassin, so I removed exim. AHHHHH!!!!!


0
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 
LVL 1

Accepted Solution

by:
linux_geek earned 455 total points
ID: 9620969
Sorry, my point was that you could try to do more than one in one command, I realise that the individual installs don't work. Because basically if apt get can't run dpkg to get dpkg then you aren't going to get anywhere!

Yah...don't worry about it, I've done equally stupid things like overwriting my /home partition!

Ummm....it really looks like your only option is a CD boot.....you haven't been able to get dpkg/dselect from the internet then?






0
 

Author Comment

by:waffe
ID: 9621958
I see what you mean about using more then one variable for the apt-get command like:

apt-get install dpkg dselect

I get this error (just like the last error)

Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  dpkg dselect
0 packages upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/1227kB of archives. After unpacking 3686kB will be used.
Could not exec dpkg!
E: Sub-process /usr/bin/dpkg returned an error code (100)

My cd rom worked fine when I put the Debian disk in it and restarted Linux. When Linux restarted it went into a help/safe boot mode, but I found nothing about fixing a corrupt or damaged file system.

Sendmail, apache, ftp, ETC do work. Things like dpkg, deselct, php4 do not work. So, for the most part I am up and running, but this blunder is a week old now and a solution would sure feel goooood!

I got a Linux guy coming over today around noon (knock on wood!). Hopefully we will solve it all by 5:00. LOL!! Ya right.... I’ll keep ya posted...

Thanks,

Bill
0
 
LVL 1

Expert Comment

by:linux_geek
ID: 9686670
Have you sorted your problem?
0
 

Author Comment

by:waffe
ID: 9689827
Yes I have! Sorry I did not get back to you. The first Linux guy could not figure it out. Luckly he had a friend that is a debian expert. Took him about 30min and all is good. Sorry, but I do not have any real info on how he solved the problem. Thanks for your input linux_geek, till next time.

Bill
0
 
LVL 1

Expert Comment

by:linux_geek
ID: 9689868
That's a shame that you don't know how he solved it.
Well thanks for accepting my answer even though I didn't actually solve your problem :-P
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now