执行 apt-get -f install 提示错误
分类: Linux 2015-01-24 21:26 554人阅读 评论(0) 收藏 举报
1. 问题:
- usloft1359:~# rvm install 2.2.0
- Searching for binary rubies, this might take some time.
- No binary rubies available for: debian/6/x86_64/ruby-2.2.0.
- Continuing with compilation. Please read ‘rvm help mount‘ to get more information on binary rubies.
- /usr/local/rvm/scripts/functions/support: line 360: rvm_debug: command not found
- Checking requirements for debian.
- Installing requirements for debian.
- Updating system...
- Installing required packages: gawk, libreadline6-dev, libyaml-dev, libsqlite3-dev, sqlite3, libgdbm-dev, libffi-dev...
- Error running ‘requirements_debian_libs_install gawk libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 libgdbm-dev libffi-dev‘,
- showing last 15 lines of /usr/local/rvm/log/1422103005_ruby-2.2.0/package_install_gawk_libreadline6-dev_libyaml-dev_libsqlite3-dev_sqlite3_libgdbm-dev_libffi-dev.log
- libc6-dev : Depends: libc6 (= 2.19-13) but 2.18-4 is to be installed
- libc6-i386 : Depends: libc6 (= 2.19-13) but 2.18-4 is to be installed
- libffi-dev : Depends: libffi6 (= 3.1-2+b2) but it is not going to be installed
- libgdbm-dev : Depends: libgdbm3 (= 1.8.3-13.1) but 1.8.3-9 is to be installed
- Breaks: libgdbm3 (< 1.8.3-12.1) but 1.8.3-9 is to be installed
- libreadline6-dev : Depends: libreadline6 (= 6.3-8+b3) but 6.1-3 is to be installed
- Depends: libtinfo-dev but it is not going to be installed
- libsqlite3-dev : Depends: libsqlite3-0 (= 3.8.7.4-1) but 3.7.3-1 is to be installed
- libyaml-dev : Depends: libyaml-0-2 (= 0.1.6-3) but it is not going to be installed
- locales : Depends: glibc-2.19-1
- sqlite3 : Depends: libsqlite3-0 (= 3.8.7.4-1) but 3.7.3-1 is to be installed
- Depends: libtinfo5 but it is not going to be installed
- E: Unmet dependencies. Try ‘apt-get -f install‘ with no packages (or specify a solution).
- ++ return 100
- ++ return 100
2. 解决(1) apt-get -f install, 可还是在报错
Hit http://ftp.de.debian.org sid/main amd64 Packages/DiffIndex
Fetched 190 B in 0s (259 B/s)
Reading package lists... Done
W: GPG error: http://us.archive.ubuntu.com lucid Release: The fo
llowing
signatures couldn‘t be verified because the public key i
s not available: NO_PUBKEY 40976EAF437D05B5
usloft1359:~# apt-get upgrade
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:
libc-dev-bin : Depends: libc6 (> 2.19) but 2.18-4 is installed
libc6-dev : Depends: libc6 (= 2.19-13) but 2.18-4 is installed
libc6-i386 : Depends: libc6 (= 2.19-13) but 2.18-4 is installed
locales : Depends: glibc-2.19-1
E: Unmet dependencies. Try using -f.
3. 解决(2)apt-get check , 还是报错
[plain] view plaincopyprint?
- usloft1359:~# apt-get --fix-broken install
- <pre name="code" class="plain">debconf: DbDriver "config": /var/cache/debconf/config.dat is lock
4. 解决(3), 使用 fuser 找到进程ID并杀之
[plain] view plaincopyprint?
- fuser /var/cache/debconf/config.dat
[plain] view plaincopyprint?
- kill 找到的ID
[plain] view plaincopyprint?
- 参考 http://blog.chinaunix.net/uid-15750156-id-3075708.html
[plain] view plaincopyprint?
- </pre><pre code_snippet_id="588231" snippet_file_name="blog_20150124_8_1223340" name="code" class="plain">
[plain] view plaincopyprint?
- 5. 再执行 apt-get -f install 最终解决
版权声明:本文为博主原创文章,未经博主允许不得转载。
http://blog.csdn.net/beiquandeng/article/details/43090899