首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >debconf坏了,什么都不能安装了

debconf坏了,什么都不能安装了
EN

Unix & Linux用户
提问于 2017-08-16 08:08:52
回答 1查看 13K关注 0票数 0

我试图在我的raspbian安装上安装对接器,但意外地损坏了apt-get

如果运行apt-get installupgrade,将得到以下错误:

代码语言:javascript
复制
E: The package debconf needs to be reinstalled, but I can't find an archive for it.

我尝试了我可以在网上找到的所有建议的解决方案,例如:

命令:

代码语言:javascript
复制
apt-get -f install debconf

结果:

代码语言:javascript
复制
root@raspberrypi:~# apt-get -f install debconf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package debconf needs to be reinstalled, but I can't find an archive for it.

命令:

代码语言:javascript
复制
dpkg-reconfigure debconf

结果:

代码语言:javascript
复制
root@raspberrypi:~# dpkg-reconfigure debconf
/usr/sbin/dpkg-reconfigure: debconf is broken or not fully installed

命令:

代码语言:javascript
复制
apt-get install --reinstall debconf

结果:

代码语言:javascript
复制
root@raspberrypi:~# apt-get install --reinstall debconf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package debconf needs to be reinstalled, but I can't find an archive for it.

命令:

代码语言:javascript
复制
dpkg --remove --force-remove-reinstreq debconf

结果:

代码语言:javascript
复制
root@raspberrypi:/var/cache/apt/archives# dpkg-reconfigure debconf
/usr/sbin/dpkg-reconfigure: debconf is broken or not fully installed
root@raspberrypi:/var/cache/apt/archives# sudo dpkg --configure -a
Setting up libc6-dbg:armhf (2.19-18+deb8u10) ...
dpkg: dependency problems prevent configuration of debconf-i18n:
debconf-i18n depends on debconf (= 1.5.56+deb8u1); however:
Version of debconf on system is 1.5.56.

dpkg: error processing package debconf-i18n (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of debconf-utils:
debconf-utils depends on debconf (= 1.5.56+deb8u1); however:
Version of debconf on system is 1.5.56.

dpkg: error processing package debconf-utils (--configure):
dependency problems - leaving unconfigured
Setting up python-software-properties (0.92.25debian1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-software-properties (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up perl-modules (5.20.2-3+deb8u8) ...
Setting up perl (5.20.2-3+deb8u8) ...
Setting up libtirpc1:armhf (0.2.5-1+deb8u1) ...
Setting up libc-dev-bin (2.19-18+deb8u10) ...
Setting up libperl5.20 (5.20.2-3+deb8u8) ...
Setting up libc6-dev:armhf (2.19-18+deb8u10) ...
Setting up rpcbind (0.2.1-6+deb8u2) ...
insserv: warning: current start runlevel(s) (empty) of script `rpcbind' overrides LSB defaults (S).
insserv: warning: current stop runlevel(s) (0 1 6 S) of script `rpcbind' overrides LSB defaults (0 1 6).
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Errors were encountered while processing:
debconf-i18n
debconf-utils
python-software-properties
root@raspberrypi:/var/cache/apt/archives# sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package debconf needs to be reinstalled, but I can't find an archive for it.
root@raspberrypi:/var/cache/apt/archives# sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of debconf-i18n:
debconf-i18n depends on debconf (= 1.5.56+deb8u1); however:
Version of debconf on system is 1.5.56.

dpkg: error processing package debconf-i18n (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of debconf-utils:
debconf-utils depends on debconf (= 1.5.56+deb8u1); however:
Version of debconf on system is 1.5.56.

dpkg: error processing package debconf-utils (--configure):
dependency problems - leaving unconfigured
Setting up python-software-properties (0.92.25debian1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-software-properties (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
debconf-i18n
debconf-utils
python-software-properties
root@raspberrypi:/var/cache/apt/archives# apt-get -f install debconf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package debconf needs to be reinstalled, but I can't find an archive for it.
root@raspberrypi:/var/cache/apt/archives# cd
root@raspberrypi:~# apt-get -f install debconf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package debconf needs to be reinstalled, but I can't find an archive for it.
root@raspberrypi:~# dpkg-reconfigure debconf
/usr/sbin/dpkg-reconfigure: debconf is broken or not fully installed
root@raspberrypi:~# apt-get install --reinstall debconf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package debconf needs to be reinstalled, but I can't find an archive for it.
root@raspberrypi:~# dpkg --remove --force-remove-reinstreq debconf
dpkg: dependency problems prevent removal of debconf:
tasksel depends on debconf (>= 0.5) | debconf-2.0; however:
Package debconf is to be removed.
Package debconf-2.0 is not installed.
Package debconf which provides debconf-2.0 is to be removed.
tasksel depends on debconf (>= 1.5.34) | cdebconf (>= 0.106); however:
Package debconf is to be removed.
Package cdebconf is not installed.
tasksel depends on debconf (>= 0.5) | debconf-2.0; however:
Package debconf is to be removed.
Package debconf-2.0 is not installed.
Package debconf which provides debconf-2.0 is to be removed.
tasksel depends on debconf (>= 1.5.34) | cdebconf (>= 0.106); however:
Package debconf is to be removed.
Package cdebconf is not installed.
locales depends on debconf (>= 0.5) | debconf-2.0; however:
Package debconf is to be removed.
Package debconf-2.0 is not installed.
Package debconf which provides debconf-2.0 is to be removed.
ca-certificates depends on debconf (>= 0.5) | debconf-2.0; however:
Package debcon
dpkg: error processing package debconf (--remove):
dependency problems - not removing
Errors were encountered while processing:
debconf

命令:

代码语言:javascript
复制
dpkg --configure -a

结果:

代码语言:javascript
复制
root@raspberrypi:~# dpkg --configure -a
dpkg: dependency problems prevent configuration of debconf-i18n:
debconf-i18n depends on debconf (= 1.5.56+deb8u1); however:
Version of debconf on system is 1.5.56.

dpkg: error processing package debconf-i18n (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of debconf-utils:
debconf-utils depends on debconf (= 1.5.56+deb8u1); however:
Version of debconf on system is 1.5.56.

dpkg: error processing package debconf-utils (--configure):
dependency problems - leaving unconfigured
Setting up python-software-properties (0.92.25debian1) ...
Traceback (most recent call last):
File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-software-properties (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
debconf-i18n
debconf-utils
python-software-properties

命令:

代码语言:javascript
复制
dpkg -C

结果:

代码语言:javascript
复制
The following packages are in a mess due to serious problems during
installation.  They must be reinstalled for them (and any packages
that depend on them) to function properly:
debconf              Debian configuration management system

The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
debconf-i18n         full internationalization support for debconf
debconf-utils        debconf utilities

The following packages are only half configured, probably due to problems
configuring them the first time.  The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
python-software-properties manage the repositories that you install software f

命令:

代码语言:javascript
复制
apt-cache policy

结果:

代码语言:javascript
复制
root@raspberrypi:~# apt-cache policy
Package files:
100 /var/lib/dpkg/status
    release a=now
500 http://archive.raspberrypi.org/debian/ jessie/ui armhf Packages
    release o=Raspberry Pi Foundation,a=stable,n=jessie,l=Raspberry Pi Foundation,c=ui
    origin archive.raspberrypi.org
500 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages
    release o=Raspberry Pi Foundation,a=stable,n=jessie,l=Raspberry Pi Foundation,c=main
    origin archive.raspberrypi.org
Pinned packages:

命令:

代码语言:javascript
复制
apt-get -f install

结果:

代码语言:javascript
复制
root@raspberrypi:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package debconf needs to be reinstalled, but I can't find an archive for it.

命令:

代码语言:javascript
复制
cat /etc/*-release

结果:

代码语言:javascript
复制
root@raspberrypi:~# cat /etc/*-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

命令:

代码语言:javascript
复制
apt-cache policy debconf debconf-i18n debconf-utils

结果:

代码语言:javascript
复制
root@raspberrypi:~# apt-cache policy debconf debconf-i18n debconf-utils
debconf:
Installed: 1.5.56
Candidate: 1.5.56
Version table:
*** 1.5.56 0
        100 /var/lib/dpkg/status
debconf-i18n:
Installed: 1.5.56+deb8u1
Candidate: 1.5.56+deb8u1
Version table:
*** 1.5.56+deb8u1 0
        100 /var/lib/dpkg/status
debconf-utils:
Installed: 1.5.56+deb8u1
Candidate: 1.5.56+deb8u1
Version table:
*** 1.5.56+deb8u1 0
        100 /var/lib/dpkg/status

命令:

代码语言:javascript
复制
cat /etc/apt/sources.list

结果:

代码语言:javascript
复制
root@raspberrypi:~# cat /etc/apt/sources.list
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

命令:

代码语言:javascript
复制
ls -Al /etc/apt/sources.list.d/

结果:

代码语言:javascript
复制
root@raspberrypi:~# ls -Al /etc/apt/sources.list.d/
total 4
-rw-r--r-- 1 root root 193 Apr 10 09:58 raspi.list

命令:

代码语言:javascript
复制
cat /etc/apt/sources.list.d/raspi.list

结果:

代码语言:javascript
复制
root@raspberrypi:~# cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ jessie main ui

有人知道下一步该做什么吗?

不需要重新安装操作系统就好了。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2017-08-17 16:51:42

您丢失了您的主要Raspbian存档,它应该在您的sources.list中:

代码语言:javascript
复制
anthony@Kilby:~ $ cat /etc/apt/sources.list
deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi

如果没有这一点,就没有地方可以从debconf 1.5.56+deb8u1上下载。

很可能添加源,然后添加apt-get update,然后添加apt-get install -f就足以修复它了。如果不是,您将需要手动下载http://mirrordirector.raspbian.org/raspbian/pool/main/d/debconf/debconf_1.5.56+deb8u1_all.deb并使用dpkg -i debconf_1.5.56+deb8u1_all.deb安装它。手动下载方式,包括wget/curl或apt-get download debconf=1.5.56+deb8u1。后者是最简单的,如果它有效。

票数 4
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/386362

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档