DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Before I begin, I'd just like to say hello to you all as this is my first post. I hope I can contribute something to the forum in future.
Background:
I have a VM that has been running happily for the last couple of years running various services (mail, web, etc). A few months ago I decided to install a DNS server so I could redirect sub-domains to my home server. I ran into an issue with apt and can more or less no longer use the apt-get. I exceeded my time window and basically left it as is for the last few months.
Observations (Issues with apt / versioning ?) :
1. I attempt to add or remove a package (any package)
Code:
root@myhost:~# apt-get remove bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
krb5-user : Depends: libkrb5-3 (= 1.8.3+dfsg-4squeeze7) but 1.8.3+dfsg-4squeeze6 is to be installed
libgssapi-krb5-2 : Depends: libkrb5-3 (= 1.8.3+dfsg-4squeeze7) but 1.8.3+dfsg-4squeeze6 is to be installed
libkrb5-3 : Depends: libkrb5support0 (= 1.8.3+dfsg-4squeeze6) but 1.8.3+dfsg-4squeeze7 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
2. I follow apts recommendation
Code:
root@myhost:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
bind9 libkrb5-3
The following packages will be upgraded:
bind9 libkrb5-3
2 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
38 not fully installed or removed.
Need to get 0 B/734 kB of archives.
After this operation, 127 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Preconfiguring packages ...
(Reading database ... 38196 files and directories currently installed.)
Preparing to replace libkrb5-3 1.8.3+dfsg-4squeeze6 (using .../libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb) ...
Unpacking replacement libkrb5-3 ...
dpkg: error processing /var/cache/apt/archives/libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb (--unpack):
unable to install new version of `./usr/lib/krb5': No such file or directory
configured to not write apport reports
Preparing to replace bind9 1:9.7.3.dfsg-1~squeeze8 (using .../bind9_1%3a9.7.3.dfsg-1~squeeze11_amd64.deb) ...
Unpacking replacement bind9 ...
dpkg: error processing /var/cache/apt/archives/bind9_1%3a9.7.3.dfsg-1~squeeze11_amd64.deb (--unpack):
unable to install new version of `./etc/apparmor.d/force-complain': No such file or directory
configured to not write apport reports
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb
/var/cache/apt/archives/bind9_1%3a9.7.3.dfsg-1~squeeze11_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@myhost:~# uname -a
Linux myhost.mydomain 2.6.32-042stab078.26 #1 SMP Wed Jun 19 11:05:34 MSK 2013 x86_64 GNU/Linux
6. Something weird while doing some investigation
Code:
root@myhost:~# ls -alhtr /usr/lib/ | less
d????????? ? ? ? ? ? krb5
root@myhost:/var/log/apt# rmdir /usr/lib/krb5
rmdir: failed to remove `/usr/lib/krb5': No such file or directory
root@myhost:/var/log/apt# cd /usr/lib/krb5
-su: cd: /usr/lib/krb5: No such file or directory
root@myhost:/var/log/apt# ls /usr/lib/krb5
ls: cannot access /usr/lib/krb5: No such file or directory
I hope someone can help shed some light on whats wrong with my system.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Have you tried running "apt-get clean" before your "apt-get -f install"? The second listing suggests that the packages you have cached might be corrupt.
Have you tried running "apt-get clean" before your "apt-get -f install"? The second listing suggests that the packages you have cached might be corrupt.
Hello 273. Yes I've tried running apt-get clean but sadly the same result.
Code:
root@myhost:~# apt-get clean
root@myhost:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
bind9 libkrb5-3
The following packages will be upgraded:
bind9 libkrb5-3
2 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
38 not fully installed or removed.
Need to get 734 kB of archives.
After this operation, 127 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ftp.debian.org/debian/ squeeze/main libkrb5-3 amd64 1.8.3+dfsg-4squeeze7 [374 kB]
Get:2 http://ftp.debian.org/debian/ squeeze/main bind9 amd64 1:9.7.3.dfsg-1~squeeze11 [360 kB]
Fetched 734 kB in 0s (4,434 kB/s)
Preconfiguring packages ...
(Reading database ... 38196 files and directories currently installed.)
Preparing to replace libkrb5-3 1.8.3+dfsg-4squeeze6 (using .../libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb) ...
Unpacking replacement libkrb5-3 ...
dpkg: error processing /var/cache/apt/archives/libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb (--unpack):
unable to install new version of `./usr/lib/krb5': No such file or directory
configured to not write apport reports
Preparing to replace bind9 1:9.7.3.dfsg-1~squeeze8 (using .../bind9_1%3a9.7.3.dfsg-1~squeeze11_amd64.deb) ...
Unpacking replacement bind9 ...
dpkg: error processing /var/cache/apt/archives/bind9_1%3a9.7.3.dfsg-1~squeeze11_amd64.deb (--unpack):
unable to install new version of `./etc/apparmor.d/force-complain': No such file or directory
configured to not write apport reports
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb
/var/cache/apt/archives/bind9_1%3a9.7.3.dfsg-1~squeeze11_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Sorry, was worth a try.
I'm sure somebody else will have some ideas.
No bother, thanks for your help. This isn't a hugely pressing matter... but still quite annoying as I can't install any packages nor redirect sub domains to my home server.
It's probably also worth nothing that I do not have physical access to this server.
This depends on the dselect package, hopefully you have it installed.
Alternatively, you can get the oldstable package (Debian 6 is oldstable) via this link: http://packages.debian.org/squeeze/dselect Choose a mirror near you for the correct arch, fetch it with wget then use dpkg to install it.
I noticed the errors you get are about missing paths too. You may want to create the required directories manually (use mkdir for that).
Also, consider the --reinstall option of apt-get and run apt-get --check to see if the cache is consistent with what's on the system.
This depends on the dselect package, hopefully you have it installed.
Alternatively, you can get the oldstable package (Debian 6 is oldstable) via this link: http://packages.debian.org/squeeze/dselect Choose a mirror near you for the correct arch, fetch it with wget then use dpkg to install it.
I noticed the errors you get are about missing paths too. You may want to create the required directories manually (use mkdir for that).
Also, consider the --reinstall option of apt-get and run apt-get --check to see if the cache is consistent with what's on the system.
Hello Dutch_Master
Thank you for your reply, but I didn't have any success with these commands.
Code:
root@myhost:~# apt-get -f
apt 0.8.10.3 for amd64 compiled on Apr 15 2011 07:35:31
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
autoremove - Remove automatically all unused packages
purge - Remove packages and config files
source - Download source archives
build-dep - Configure build-dependencies for source packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
markauto - Mark the given packages as automatically installed
unmarkauto - Mark the given packages as manually installed
Options:
-h This help text.
-q Loggable output - no progress indicator
-qq No output except for errors
-d Download only - do NOT install or unpack archives
-s No-act. Perform ordering simulation
-y Assume Yes to all queries and do not prompt
-f Attempt to correct a system with broken dependencies in place
-m Attempt to continue if archives are unlocatable
-u Show a list of upgraded packages as well
-b Build the source package after fetching it
-V Show verbose version numbers
-c=? Read this configuration file
-o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp
See the apt-get(8), sources.list(5) and apt.conf(5) manual
pages for more information and options.
This APT has Super Cow Powers.
root@myhost:~#
Everything checks out fine.
Code:
root@myhost:~# apt-get -f check
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
Code:
root@myhost:~# aptitude --get-selections > selections.txt
aptitude: unrecognized option '--get-selections'
root@myhost:~# cat selections.txt
aptitude 0.6.3
Usage: aptitude [-S fname] [-u|-i]
aptitude [options] <action> ...
Actions (if none is specified, aptitude will enter interactive mode):
install - Install/upgrade packages.
remove - Remove packages.
purge - Remove packages and their configuration files.
hold - Place packages on hold.
unhold - Cancel a hold command for a package.
markauto - Mark packages as having been automatically installed.
unmarkauto - Mark packages as having been manually installed.
forbid-version - Forbid aptitude from upgrading to a specific package version.
update - Download lists of new/upgradable packages.
safe-upgrade - Perform a safe upgrade.
full-upgrade - Perform an upgrade, possibly installing and removing packages.
build-dep - Install the build-dependencies of packages.
forget-new - Forget what packages are "new".
search - Search for a package by name and/or expression.
show - Display detailed information about a package.
clean - Erase downloaded package files.
autoclean - Erase old downloaded package files.
changelog - View a package's changelog.
download - Download the .deb file for a package.
reinstall - Download and (possibly) reinstall a currently installed package.
why - Show the manually installed packages that require a package, or
why one or more packages would require the given package
why-not - Show the manually installed packages that lead to a conflict
with the given package, or why one or more packages would
lead to a conflict with the given package if installed.
Options:
-h This help text.
--no-gui Do not use the GTK GUI even if available.
-s Simulate actions, but do not actually perform them.
-d Only download packages, do not install or remove anything.
-P Always prompt for confirmation or actions.
-y Assume that the answer to simple yes/no questions is 'yes'.
-F format Specify a format for displaying search results; see the manual.
-O order Specify how search results should be sorted; see the manual.
-w width Specify the display width for formatting search results.
-f Aggressively try to fix broken packages.
-V Show which versions of packages are to be installed.
-D Show the dependencies of automatically changed packages.
-Z Show the change in installed size of each package.
-v Display extra information. (may be supplied multiple times).
-t [release] Set the release from which packages should be installed.
-q In command-line mode, suppress the incremental progress.
indicators.
-o key=val Directly set the configuration option named 'key'.
--with(out)-recommends Specify whether or not to treat recommends as.
strong dependencies.
-S fname Read the aptitude extended status info from fname.
-u Download new package lists on startup.
(terminal interface only) -i Perform an install run on startup.
(terminal interface only)
This aptitude does not have Super Cow Powers.
root@myhost:~#
My bad, replace aptitude with apt-get in those commands. Apols!
Still no success with this one.
Code:
root@myhost:/# apt-get --get-selections > selections.txt
E: Command line option --get-selections is not understood
I tried updating libkrb5 using a downloaded .deb. But again errors with no such file or directory.
Code:
root@myhost:/# dpkg -i libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb
(Reading database ... 38165 files and directories currently installed.)
Preparing to replace libkrb5-3 1.8.3+dfsg-4squeeze6 (using libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb) ...
Unpacking replacement libkrb5-3 ...
dpkg: error processing libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb (--install):
unable to install new version of `./usr/lib/krb5': No such file or directory
Errors were encountered while processing:
libkrb5-3_1.8.3+dfsg-4squeeze7_amd64.deb
Would this have anything to do with this? Has anyone seen anything similar on Debian?
Code:
root@myhost:/# ls -alhtr /usr/lib/ | less
ls: cannot access /usr/lib/krb5: No such file or directory
Code:
root@myhost:/# ls -alhtr /usr/lib/ | less
d????????? ? ? ? ? ? krb5
Right, I now see I've made a typo: the --get-selection is w/o the s on the end (so is --set-selection) Sorry!
As for the strange results for ls, I suspect you're on a shared server, right? In which case you probably have a chroot jail for your system and the sys-admin didn't install it proper, there may be sym-links missing. Inform your host.
Right, I now see I've made a typo: the --get-selection is w/o the s on the end (so is --set-selection) Sorry!
As for the strange results for ls, I suspect you're on a shared server, right? In which case you probably have a chroot jail for your system and the sys-admin didn't install it proper, there may be sym-links missing. Inform your host.
Hello still no success with the --get-selection arg (for both apt-get and aptitude. I don't think there is a chroot jail. It's a VM & I don't know what hyper-visor it's running on.
Would this have anything to do with this? Has anyone seen anything similar on Debian?
Code:
root@myhost:/# ls -alhtr /usr/lib/ | less
ls: cannot access /usr/lib/krb5: No such file or directory
Code:
root@myhost:/# ls -alhtr /usr/lib/ | less
d????????? ? ? ? ? ? krb5
Yes.
This is the guts of your problem.
Fix this and you can then install your package.
As to how ..... not sure.
Check 'mount' to be sure nothing wierd is mounted on it.
Check it from a live environment or such (is there a "recovery console" or such?).
Maybe fsck the disk.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.