LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   .deb install script fails - How to I completely reset the package and related files? (https://www.linuxquestions.org/questions/debian-26/deb-install-script-fails-how-to-i-completely-reset-the-package-and-related-files-576714/)

kramed 08-13-2007 05:28 AM

.deb install script fails - How to I completely reset the package and related files?
 
Hi there. I am trying to install OpenLdap server and utilities on my Debian SID machine but unfortunately I am experiencing a problem:

Errors were encountered while processing:
slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)


I recently had a source installation of slapd on the system but removed it manually in preparation to use the Debian maintained version. It is likely possible that I removed another LDAP utility program that I had installed when I did the manual removal. I tried to remedy this by selecting all my ldap related packages in Synaptic and opted to reinstall all of them but unfortunately my problem remains. Can someone point me in the right direction, I am new to apt and the deb package system. Thanks!

indienick 08-13-2007 08:56 AM

Try running apt-get -f install, and see if that clears anything up.
That command is used for when a package is installed using dpkg, but dependencies aren't met; it just sort of "dequeues" it from this state of .deb limbo, and installs all of the needed dependencies.

rickh 08-13-2007 10:24 AM

I would drop back a little bit and reconsider the package manager you are using. It may or may not be related to your immediate problem, but Synaptic merely adds a level of complexity to package management that, as a Slackware user, you do not need.

I have never liked the apt-get -f option either. It often works to clear up such problems, but, IMO, it is clearing a symptom of deeper problems, rather than solving them. Back in the day when I used apt-get, I would have first attacked such an error by using, "# dpkg --purge slapd", then attempting a reinstall.

Beginning with Etch, the Debian recommended package manager is "aptitude", and again, I recommend it's usage as a command line instruction, rather than the ncurses interface generated by # aptitude without any parameters. The reason it has become the recommended package manager is that it supposedly handles dependencies in a fashion superior to apt-get. The apt-get program in Sid attempts to mirror aptitude's dependency handling, but I have heard that it is still rather buggy.

A warning: Aptitude still does not always play nicely with packages that were originally installed with apt-get, dpkg, or manual compilation. A good precaution is to first execute, "# aptitude keep-all"

Finally, don't forget that you are using Sid, and dependency issues do occasionally arise there.

HappyTux 08-13-2007 10:34 AM

Quote:

Originally Posted by kramed (Post 2857166)
Hi there. I am trying to install OpenLdap server and utilities on my Debian SID machine but unfortunately I am experiencing a problem:

Errors were encountered while processing:
slapd
E: Sub-process /usr/bin/dpkg returned an error code (1)


I recently had a source installation of slapd on the system but removed it manually in preparation to use the Debian maintained version. It is likely possible that I removed another LDAP utility program that I had installed when I did the manual removal. I tried to remedy this by selecting all my ldap related packages in Synaptic and opted to reinstall all of them but unfortunately my problem remains. Can someone point me in the right direction, I am new to apt and the deb package system. Thanks!

A lot of times that error means you have run into a packaging error where one file is in two packages so you get an overwriting error, if you see this a little farther up in your error output then use dpkg -i --force-overwrite /path/to/package.deb (this path is show at bottom of error) to make it install then use dpkg --configure -a to get the unconfigured packages that may have happened when the error occurred.


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