LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 10-09-2010, 11:41 PM   #1
i_heart_pandas
LQ Newbie
 
Registered: Sep 2009
Posts: 15

Rep: Reputation: 0
fixing apt-get errors


been living with apt-get not working for a while now, don't know how it broke but i'm running a 2.6.26.8 kernel for vmware and maybe thats it?

Code:
bulldozer:/home/g3rc4n# uname -r
2.6.26.8
bulldozer:/home/g3rc4n# apt-get update
Hit http://ftp.uk.debian.org lenny Release.gpg
Ign http://ftp.uk.debian.org lenny/main Translation-en_GB
Hit http://ftp.uk.debian.org lenny Release                                 
Ign http://ftp.uk.debian.org lenny/main Packages/DiffIndex                                                                      
Ign http://ftp.uk.debian.org lenny/main Sources/DiffIndex                                                  
Hit http://ftp.uk.debian.org lenny/main Packages                           
Hit http://security.debian.org lenny/updates Release.gpg                   
Ign http://security.debian.org lenny/updates/main Translation-en_GB                              
Hit http://ftp.uk.debian.org lenny/main Sources                                                  
Hit http://security.debian.org lenny/updates Release                       
Ign http://security.debian.org lenny/updates/main Packages/DiffIndex       
Ign http://security.debian.org lenny/updates/main Sources/DiffIndex
Hit http://security.debian.org lenny/updates/main Packages
Hit http://volatile.debian.org lenny/volatile Release.gpg
Ign http://volatile.debian.org lenny/volatile/main Translation-en_GB
Hit http://security.debian.org lenny/updates/main Sources
Hit http://volatile.debian.org lenny/volatile Release
Ign http://volatile.debian.org lenny/volatile/main Packages/DiffIndex
Ign http://volatile.debian.org lenny/volatile/main Sources/DiffIndex
Hit http://volatile.debian.org lenny/volatile/main Packages
Hit http://volatile.debian.org lenny/volatile/main Sources
Reading package lists... Done
bulldozer:/home/g3rc4n# apt-get upgrade --yes
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  bind9 bind9-host bind9utils dnsutils
The following packages will be upgraded:
  acpid apt apt-utils avahi-daemon bzip2 cpio cups-bsd cups-client cups-common debian-archive-keyring dhcp3-client dhcp3-common dpkg-dev dselect fuse-utils
  ghostscript gnome-network-admin gnome-system-tools gs-common gtk2-engines-pixbuf iputils-ping kdelibs-data kdelibs4c2a libapr1 libaprutil1 libavahi-client-dev
  libavahi-client3 libavahi-common-data libavahi-common-dev libavahi-common3 libavahi-compat-libdnssd1 libavahi-core5 libavahi-glib-dev libavahi-glib1
  libavahi-gobject0 libavahi-qt3-1 libavahi-ui0 libavcodec51 libavformat52 libavutil49 libbz2-1.0 libcups2 libcupsimage2 libcupsys2 libcurl3-gnutls libfam0
  libfreetype6 libfreetype6-dev libfuse2 libgs8 libgtk2.0-0 libgtk2.0-0-dbg libgtk2.0-bin libgtk2.0-common libgtk2.0-dev libjasper1 libkpathsea4 libldap-2.4-2
  libmozjs1d libpango1.0-0 libpango1.0-common libpango1.0-dev libpcsclite1 libpng12-0 libpng12-dev libpoppler-glib3 libpoppler3 libpostproc51 libpq5 libpurple0
  libqt4-dbus libqt4-designer libqt4-network libqt4-qt3support libqt4-script libqt4-sql libqt4-sql-mysql libqt4-xml libqtcore4 libqtgui4 libsmbclient libssl0.9.8
  libsvn-perl libsvn1 libswscale0 libtheora0 libtiff4 libwbclient0 libwww-perl libxerces2-java libxerces2-java-gcj libxext-dev libxext6 lintian
  linux-headers-2.6.26-2-all-amd64 linux-headers-2.6.26-2-amd64 linux-headers-2.6.26-2-common linux-headers-2.6.26-2-common-openvz
  linux-headers-2.6.26-2-common-vserver linux-headers-2.6.26-2-common-xen linux-headers-2.6.26-2-openvz-amd64 linux-headers-2.6.26-2-vserver-amd64
  linux-headers-2.6.26-2-xen-amd64 linux-libc-dev mysql-client mysql-client-5.0 mysql-server mysql-server-5.0 nano nfs-common nfs-kernel-server openoffice.org
  openoffice.org-base openoffice.org-base-core openoffice.org-calc openoffice.org-common openoffice.org-core openoffice.org-draw openoffice.org-evolution
  openoffice.org-filter-mobiledev openoffice.org-gcj openoffice.org-gnome openoffice.org-gtk openoffice.org-help-en-gb openoffice.org-help-en-us
  openoffice.org-impress openoffice.org-java-common openoffice.org-l10n-en-gb openoffice.org-math openoffice.org-officebean openoffice.org-report-builder-bin
  openoffice.org-style-andromeda openoffice.org-style-tango openoffice.org-writer openssl pidgin pidgin-data poppler-utils python-support python2.4 python2.4-minimal
  python2.5 python2.5-dev python2.5-minimal qt4-qtconfig samba samba-common smbclient subversion sudo system-tools-backends tar texlive-base-bin texlive-base-bin-doc
  texlive-extra-utils totem-common totem-gstreamer totem-mozilla totem-plugins ttf-opensymbol tzdata usbutils w3m wget winbind wireshark wireshark-common xscreensaver
  xscreensaver-data xserver-xorg-video-intel xulrunner-1.9 xulrunner-1.9-gnome-support
172 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
2 not fully installed or removed.
Need to get 0B/343MB of archives.
After this operation, 24.0MB of additional disk space will be used.
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 175577 files and directories currently installed.)
Preparing to replace acpid 1.0.8-1lenny1 (using .../acpid_1.0.8-1lenny2_amd64.deb) ...
invoke-rc.d: not a symlink: /etc/rc2.d/S12acpid
dpkg: warning - old pre-removal script returned error exit status 102
dpkg - trying script from the new package instead ...
invoke-rc.d: not a symlink: /etc/rc2.d/S12acpid
dpkg: error processing /var/cache/apt/archives/acpid_1.0.8-1lenny2_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 102
update-rc.d: warning: /etc/rc1.d/K88acpid is not a symbolic link
update-rc.d: warning: /etc/rc2.d/S12acpid is not a symbolic link
update-rc.d: warning: /etc/rc3.d/S12acpid is not a symbolic link
update-rc.d: warning: /etc/rc4.d/S12acpid is not a symbolic link
update-rc.d: warning: /etc/rc5.d/S12acpid is not a symbolic link
invoke-rc.d: not a symlink: /etc/rc2.d/S12acpid
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 102
Preparing to replace tar 1.20-1 (using .../tar_1.20-1+lenny1_amd64.deb) ...
Unpacking replacement tar ...
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/acpid_1.0.8-1lenny2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
bulldozer:/home/g3rc4n# apt-get -f install --yes
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libgutenprint2 openprinting-ppds libqt4-qt3support libsensors3 poppler-utils libsnmp15 cupsddk libqt4-script libqt4-designer libqt4-network libqt4-dbus
  python-imaging libslp1 python2.4 python-ipy libsnmp-base ijsgutenprint libijs-0.35 libqtcore4 python-foomatic ssl-cert qt4-qtconfig cupsddk-drivers libqt4-sql
  foomatic-db-gutenprint openssl-blacklist python2.4-minimal libqt4-xml libqtgui4 libavahi-compat-libdnssd1 libqt4-sql-mysql hplip-data
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  acpid
The following packages will be upgraded:
  acpid
1 upgraded, 0 newly installed, 0 to remove and 174 not upgraded.
3 not fully installed or removed.
Need to get 0B/38.0kB of archives.
After this operation, 0B of additional disk space will be used.
Setting up tar (1.20-1+lenny1) ...
(Reading database ... 175577 files and directories currently installed.)
Preparing to replace acpid 1.0.8-1lenny1 (using .../acpid_1.0.8-1lenny2_amd64.deb) ...
invoke-rc.d: not a symlink: /etc/rc2.d/S12acpid
dpkg: warning - old pre-removal script returned error exit status 102
dpkg - trying script from the new package instead ...
invoke-rc.d: not a symlink: /etc/rc2.d/S12acpid
dpkg: error processing /var/cache/apt/archives/acpid_1.0.8-1lenny2_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 102
update-rc.d: warning: /etc/rc1.d/K88acpid is not a symbolic link
update-rc.d: warning: /etc/rc2.d/S12acpid is not a symbolic link
update-rc.d: warning: /etc/rc3.d/S12acpid is not a symbolic link
update-rc.d: warning: /etc/rc4.d/S12acpid is not a symbolic link
update-rc.d: warning: /etc/rc5.d/S12acpid is not a symbolic link
invoke-rc.d: not a symlink: /etc/rc2.d/S12acpid
dpkg: error while cleaning up:
 subprocess post-installation script returned error exit status 102
Errors were encountered while processing:
 /var/cache/apt/archives/acpid_1.0.8-1lenny2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
bulldozer:/home/g3rc4n# dpkg --configure -a
Setting up linux-image-2.6.26-2-amd64 (2.6.26-25lenny1) ...
Running depmod.
Running mkinitramfs-kpkg.
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
Not updating initrd symbolic links since we are being updated/reinstalled 
(2.6.26-19lenny2 was configured last, according to dpkg)
Failed to symbolic-link boot/vmlinuz-2.6.26-2-amd64 to vmlinuz.
dpkg: error processing linux-image-2.6.26-2-amd64 (--configure):
 subprocess post-installation script returned error exit status 17
dpkg: error processing acpid (--configure):
 Package is in a very bad inconsistent state - you should
 reinstall it before attempting configuration.
Errors were encountered while processing:
 linux-image-2.6.26-2-amd64
 acpid
hate to be useless but have no idea where to start?
 
Old 10-10-2010, 12:03 AM   #2
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 54
Code:
apt-get -f install
This will automatically tell apt-get to correct dependencies and continue to configure your packages. Note that apt-get -f install has NO PACKAGE APPENDED TO IT!!! This is essential; if you try to apt-get -f install a package you will further complicate things.
 
Old 10-10-2010, 09:11 AM   #3
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,462

Rep: Reputation: Disabled
You might find that your life is much easier if you switch from apt-get to aptitude.
ciao,
jdk
 
Old 10-10-2010, 09:47 AM   #4
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
Quote:
Originally Posted by jdkaye View Post
You might find that your life is much easier if you switch from apt-get to aptitude.
ciao,
jdk
It is so far from the truth it isn't even funny.

apt-get works just fine. I have used apt-get and apt-get alone for over six years without problems. If the all might Debian gods do not want people using apt-get then it should be removed from the repos.

First I would edit /etc/apt/apt.conf (You may need to create it) and add:
// auto-remove breaks on meta packages
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";

// Recommends are as of now still abused in many packages
APT::Install-Recommends "0";
APT::Install-Suggests "0";
Debug::pkgAutoRemove "0";

Then do:
apt-get clean
apt-get update
apt-get dist-upgrade

Last edited by craigevil; 10-10-2010 at 09:49 AM.
 
Old 10-10-2010, 12:53 PM   #5
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,179

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
Along with "apt-get -f install" I find that
[code]
sudo apt-get --configure -a
[code]
will clear many of this type of error for you too. I usually try it first. It is also handy without the "-a" and with a package name in that space.

Just to add to the dpkg handy commands;
Code:
dpkg-reconfigure <package or -a>
is also very handy if things are not just right as can happen in unstable versions very easily and stable ones if I am tweeking them beyond my comfort zone of knowledge (the only way to learn something new).
 
Old 10-10-2010, 08:07 PM   #6
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,610

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
aptitude works just fine. I have used aptitude and aptitude alone for over three years without problems. If the almighty Debian gods want people to use aptitude then they should recommend its use over apt-get -- oh, they have been, for years?

I switched to aptitude on the day that apt-get tried to remove libc6. It solved my dependency problem, and I haven't looked back.

In any case.. try it.
 
Old 10-10-2010, 09:44 PM   #7
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,673

Rep: Reputation: 122Reputation: 122
The key is kinda overlooked by all this bickering on apt-get vs aptitude. Let's get back to the OP chaps...

The reason the original command failed was a number of links that weren't sym-links but (presumably) the files themselves. The acpid package is to blame, obviously, so removing that should remedy the problem... Unfortunately, acpid may have dependencies that prevent the upgrade altogether... The "apt-get -f install" command will do just fine in this case.

Personally, I'm using aptitude, mostly interactive. The keyboard-based menu is much easier then memorizing commandline options Especially for novices! My
 
Old 10-10-2010, 11:14 PM   #8
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
apt-get purge acpid
apt-get clean
dpkg --configure --pending
apt-get update
apt-get -f install
apt-get upgrade
apt-get dist-upgrade
apt-get install acpid

Feel free to use aptitude in place of apt-get.

Also please post your sources.list
 
Old 10-11-2010, 06:53 AM   #9
i_heart_pandas
LQ Newbie
 
Registered: Sep 2009
Posts: 15

Original Poster
Rep: Reputation: 0
tried everything still getting all sort of type 1 errors

Code:
bulldozer:/home/g3rc4n# cat /etc/apt/sources.list
# 
# deb cdrom:[Debian GNU/Linux 5.0.0 _Lenny_ - Official amd64 NETINST Binary-1 20090214-15:57]/ lenny main

#deb cdrom:[Debian GNU/Linux 5.0.0 _Lenny_ - Official amd64 NETINST Binary-1 20090214-15:57]/ lenny main

deb http://ftp.uk.debian.org/debian/ lenny main
deb-src http://ftp.uk.debian.org/debian/ lenny main

deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main

deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
created that /etc/apt/apt.conf file
Code:
bulldozer:/home/g3rc4n# cat /etc/apt/apt.conf
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";
APT::Install-Recommends "0";
APT::Install-Suggests "0";
Debug::pkgAutoRemove "0";
 
Old 10-11-2010, 07:26 AM   #10
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 455Reputation: 455Reputation: 455Reputation: 455Reputation: 455
Never used vmware, I just use virtualbox.

rm /var/cache/apt/archives/acpid_1.0.8-1lenny2_amd64.deb

Do you use raid? If not you can safely remove mdadm.

aptitude remove mdadm acpid

aptitude clean
aptitude update
aptitude dist-upgrade

Debian Reference - Debian package management
Quote:
APT upgrade troubleshooting

Package dependency problems may occur when upgrading in unstable or testing as described in Upgrading, Section 5.3. Most of the time this is because a package that will be upgraded Depends on a package that is not yet available. These problems are fixed by using

# aptitude dist-upgrade

If this does not work, then repeat one of the following until the problem resolves itself:

# aptitude -f upgrade # continue upgrade even after error
... or
# aptitude -f dist-upgrade # continue dist-upgrade even after error

Some really broken upgrade scripts may cause persistent trouble. It is usually better to resolve this type of situation by inspecting the /var/lib/dpkg/info/packagename.{post,pre}{inst,rm} scripts of the offending package and then running:

# dpkg --configure -a # configures all partially installed packages

If a script complains about a missing configuration file, look in /etc/ for the corresponding configuration file. If one exists with an extension of .dpkg-new (or something similar), mv it to remove the suffix.
 
Old 10-12-2010, 06:12 AM   #11
i_heart_pandas
LQ Newbie
 
Registered: Sep 2009
Posts: 15

Original Poster
Rep: Reputation: 0
yes i do use raid, i'll try removing acpid later though
 
  


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
Apt-Get i need help fixing broken dependencies turkenator02 Suse/Novell 2 05-11-2006 04:36 AM
slowly fixing all the errors, please help :-\ y0shi Slackware 13 10-24-2004 08:25 PM
fixing kernel errors entropyguy Linux - Newbie 0 10-13-2004 06:01 PM
fixing dvd-r errors festriaqua Linux - Software 0 08-11-2004 08:45 PM
Fixing HD errors in Knoppix KungFuHamster Linux - General 7 05-01-2003 05:13 PM


All times are GMT -5. The time now is 10:46 AM.

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