Sub-Process /usr/bin/dpkg returned an error code (1)
I just installed Debian, and I am upgrading to unstable. When I do the command apt-get upgrade I recieve the an error saying Sub-Process /usr/bin/dpkg returned an error code (1).
this is the the screen leading up to the error: Preparing to replace console-common 0.7.38 (using .../console-common_0.7.40_all.deb) ... dpkg: error processing /var/cache/apt/archives/console-common_0.7.40_all.deb (--unpack): subprocess pre-installation script returned error exit status 9 Loading /etc/console/boottime.kmap.gz Preparing to replace libkrb53 1.3.2-2 (using .../libkrb53_1.3.3-1_i386.deb) ... Unpacking replacement libkrb53 Preparing to replace libpam-runtime 0.76-16 (using .../libpam-runtime_0.76-19_all.deb) ... Unpacking replacement libpam-runtime ... Errors were encountered while processing: /var/cache/apt/archives/console-common_0.7.40_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I am a newbie, so please be specific in your reply. Thanks a lot for your help in advance. |
After you get that error, try apt-get -f install to force an install of the files that didn't get loaded because of the error. Then try apt-get upgrade again, apt-get -f install back and forth until only the package that has the error is left.
|
thanks a lot. that worked.
|
If you are going to be using debian unstable (sid) it is inherently necessary to read the manpage for dpkg and apt-get. This was just a small taste of what can go wrong with sid :)
|
I love Sid though! It's fun! :)
|
I had a similar problem and what i found that worked for me was going into /var/lib/dpkg/info and deleting everything that had that name and you may also have to go into /var/cache/apt/archives and do the same thing. I'm fairly new to linux so if this breaks anything i am sorry. i haven't run into any problems yet that this has caused.
|
For new users, IMHO it's easier to go on with stable or testing instead of unstable.
|
Thank you, feral-deb. Your comment helped me with a somewhat chronic problem I was having with a package on Ubuntu.
|
feral-deb you're a genius! Thanks!
|
Quote:
Dude you helped me out big time i was tring to install torrentflux-b4rt and got same error after using your clean up help it installed perfectly many thanks :) |
Thanks feral-deb, your instructions worked perfectly for me.
|
Quote:
Using 'apt-get -f install' and/or 'dpkg --configure --pending' are what you should do. If your problems persist, try to read and understand the .postinst script for the problematic package and check for bugs reported against that packge. Failing that, ask for help and/or report a bug. If you are running sid, you should be prepared to do these sorts of things. Quote:
Evo2. |
i made it worse
after having the same problem as stated in the original post i used "feral-deb"s tip to delete those 2 directories
which some time later was rated inappropriate from "evo2" - too late for me... since then i cannot proceed with "apt-get install" or even the -f force way. it always halts with the following error code: Code:
6 not fully removed or installed dpkg --configure --pending does not work either i am stuck |
Hi,
ok, first off '-f' does not mean "force" it is "fix broken". As for deleting files: deleteing files in /var/cache/apt/archives should not be a problem. Deleting things in /var/lib/dpkg/info on the other hand could be, however I'm assuming you did not delete everything, just the scripts for some specific packages. Anyway it seems that the problematic packages are all non critical apache related. You may simply be able to remove them and reinstall them. If this approach seems ok to you then please try: Code:
sudo dpkg --remove libapache2-mod-php5 phpapi-20060613+lfs php5-cgi php5-gd php5-mysql phpmyadmin Evo2. |
as this server is productive right now (running a little website) i might have to wait for the weekend here
i guess reinstalling those packages will make the website unavailable for a while :) i was hoping on a fix that would enable me to just update the existing packages. but after screwing up by deleting the complete content of /var/lib/dpkg/info i probably will have to take your advice. |
Quote:
However, one firm recommendation. You are running a server. Use Stable for that, not Testing, not Unstable. For desktop systems it is arguable to run a less mature system, after all you want to run recent packages to be compatible with the next audio format or the newest Flash. You don't need that for a server. And now already you are experiencing problems. I dare to add a package to a production server when I run stable. This is unthinkable in Testing or Unstable. In two months you will suddenly be confronted with a new kernel version or a new libc if you want to install an Apache extension. Swallow hard, and re-install with Stable now you just start with this server. Usually I am against re-installing, but now you have to. Downgrading is virtually impossible. Once again, install Stable on a production server. jlinkels |
i thought updating with "apt-get install" only fetches the last stable versions?
and that this is very important to do once in a while due to upcoming fixes for security issues discovered or whatever you say i got this wrong? thx |
OK, I made a mistake. I thought you were the original poster. But that thread dates from 2004. The OP was taking about upgrading to Unstable etc., not you. You don't even use Debian, but Ubuntu.
No idea what happens in Ubuntu, sorry. jlinkels |
yeah
you kinda shocked me there :) anyway - "After all you are not running PHP either I think" - yes, i do run php. and i might have to reconfigure the whole apache stuff - so this might take more than just a few hours to reinstall i really dont look forward to it... but if there really is no alternative |
If you only "remove" a package instead of "purge" it your config files should be untouched. Anyway I'm sure your have a backup of your configuration: ;-)
Evo2. |
interesting
then it shouldn't be too difficult of course i have :) but i still need to figure out how to display an offline site with "we are currently running server updates" etc if there is no apache running any way to use a static html page on the same server? i guess not especially as search bots might visit the website. and if they get nothing at all they might rate it down or whatever. so a "503 Service Unavailable" would be probably a good way to signal them to come by later. i have an A Record to my IP address of the virtual server and my domain hoster does not provide any fallback here |
[QUOTE=euromark;3810083
but i still need to figure out how to display an offline site with "we are currently running server updates" etc if there is no apache running any way to use a static html page on the same server?[/QUOTE] Sure, just install a very small http server like thttpd and run it while you are messing around with apache. Cheers, Evo2. |
Quote:
|
This response is directed to Evo2, in post #20 you had stated that you assumed another member had a backup copy of the config. I have to admit I am new to Linux and I am currently using backtrack 4 pre final and I am definitely curious how you go about making a backup copy of the config. Thanks in advance!!
|
Hi,
Quote:
Cheers, Evo2. |
Hi,
I've had the same problem with gnokii, removig /var/lib/dpkg/info/gnokii* files didn't help. The solution was to manually adit /var/lib/dpkg/statoverride and remove faulty line, which inn my case looked like this: root gnokii 4750 /usr/sbin/mgnokiidev good luck guys |
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ok I had the same problem but it was probably due to unfinished extraction.While the machine was installing things,it froze.But in the end it was the same message.
I fixed it.I checked the archive where downloaded debs are stored for impending installation and it was nowhere.So I downloaded the deb and installed it through GDebi.In the end it just used the newly extracted post script. Also i have ubuntu but i reckon it can be easily applied to Debian seeing that they are similar. |
this did the trick for me
you can delete everything from: /var/lib/dpkg/info
or find the messed up packaged... ex "uw-imapd" $rm /var/lib/dpkg/info/uw-imapd* and then run $apt-get upgarde //Martin Dahl-Larsen |
Quote:
petemaxi |
Quote:
My issue was with gdm.postinstall ( removing from ~/info fixed it ). I use LightDM anyway. Thats what I get for tinkering with KDM / GDM LOL |
Hi,
Quote:
Please see: http://www.linuxquestions.org/questi...7/#post3753885 Evo2. |
Trying to install Java on Ubuntu server 12.04
I am trying to install java on my server.
When I run the apt-get install openjdk-7-jre I get the same error as below, any ideas? Code:
apt-get -f install openjdk-7-jre |
Hi,
at first glance it seems that the package provided by oracle is buggy. Have you tried the following? Code:
dpkg --configure --pending Any particular reason you want to install this? When I'm force to use java programs I generally find that openjdk-6-jre works. Evo2. |
No I have not. Thanks for the tip. I am following directions and I am trying to install minecraft on my server for my brother.
|
Hi,
I just downloaded minecraft_server.jar on my Squeeze box and started it up: Code:
% wget https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar Code:
Evo2. |
The dpkg --configure --pending didnt work. Is there a way that I could remove the openjdk-7-jre and install openjdk-6-jre with out it snagging on this line:
Code:
Oracle JDK 7 is NOT installed. |
Hi,
have you tried the following? Code:
dpkg --purge oracle-java7-installer |
That worked thank you. Not entirely related to these posts but do you know how to log into the minecraft server?
|
Hi,
Quote:
Quote:
Anyway best that you start a new thread if you have questions about running minecraft. Evo2. |
Still ran into this old problem, like this:
Code:
$ xdvi something.dvi Code:
$ sudo apt-get install texlive-binaries Evo2 wrote, Quote:
Code:
sudo apt-get remove texlive-binaries Code:
sudo apt-get install texlive-base |
All times are GMT -5. The time now is 04:15 PM. |