首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >后缀安装错误

后缀安装错误
EN

Unix & Linux用户
提问于 2016-10-31 08:12:53
回答 2查看 11.6K关注 0票数 4

我运行mc,并试图在shell:apt-get install curl postfix中安装curl和后缀。后缀出现了一个配置对话框,在按Ctrl(显示/隐藏MC)两次后,我无法再读取配置消息,所以我退出了MC,使用F10。apt-get过程仍然存在,我用sudo kill xxxx杀死了它。现在apt-get不起作用。

我试过apt-get -f install

代码语言:javascript
复制
X@X ~ % LC_ALL=C sudo 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:
  exim4-config lsb-invalid-mta
The following packages will be REMOVED:
  postfix
The following NEW packages will be installed:
  exim4-config lsb-invalid-mta
0 upgraded, 2 newly installed, 1 to remove and 3 not upgraded.
1 not fully installed or removed.
Need to get 0 B/523 kB of archives.
After this operation, 2462 kB disk space will be freed.
Do you want to continue? [Y/n] 
Preconfiguring packages ...
dpkg: postfix: dependency problems, but removing anyway as you requested:
 lsb-core depends on lsb-invalid-mta (>= 4.1+Debian13+nmu1) | mail-transport-agent; however:
  Package lsb-invalid-mta is not installed.
  Package mail-transport-agent is not installed.
  Package postfix which provides mail-transport-agent is to be removed.
  Package exim4-daemon-light which provides mail-transport-agent is not installed.
 bsd-mailx depends on default-mta | mail-transport-agent; however:
  Package default-mta is not installed.
  Package exim4-daemon-light which provides default-mta is not installed.
  Package mail-transport-agent is not installed.
  Package postfix which provides mail-transport-agent is to be removed.
  Package exim4-daemon-light which provides mail-transport-agent is not installed.

(Reading database ... 421170 files and directories currently installed.)
Removing postfix (2.11.3-1) ...
dpkg: error processing package postfix (--remove):
 subprocess installed pre-removal script returned error exit status 102
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)

以及在各种问题(Q1Q2Q3)中提出的其他解决方案:apt-get purge postfixapt-get --reinstall install postfixdpkg --pending --configure

一个非常相似的问题(重复?)是后缀错误,但它没有答案。

我怎样才能修好包管理器?我的操作系统是Debian Jessie。

编辑1

Bahamut的建议在错误代码102中失败:

代码语言:javascript
复制
X@X ~ % LC_ALL=C sudo dpkg --install /var/cache/apt/archives/postfix_2.11.3-1_amd64.deb
Selecting previously unselected package postfix.
(Reading database ... 421172 files and directories currently installed.)
Preparing to unpack .../postfix_2.11.3-1_amd64.deb ...
dpkg: warning: subprocess old pre-removal script returned error exit status 102
dpkg: trying script from the new package instead ...
dpkg: ... it looks like that went OK
Unpacking postfix (2.11.3-1) over (2.11.3-1) ...
Setting up postfix (2.11.3-1) ...
insserv: script postfix is not an executable regular file, skipped!

Postfix configuration was not changed.  If you need to make changes, edit
/etc/postfix/main.cf (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying main.cf, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
dpkg: error processing package postfix (--install):
 subprocess installed post-installation script returned error exit status 102
Processing triggers for systemd (215-17+deb8u5) ...
Processing triggers for ufw (0.33-2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for libc-bin (2.19-18+deb8u6) ...
Errors were encountered while processing:
 postfix
EN

回答 2

Unix & Linux用户

回答已采纳

发布于 2016-11-01 18:50:41

手动删除配置文件的工作方式如下:

代码语言:javascript
复制
rm /var/lib/dpkg/info/postfix.*
apt-get purge postfix
票数 7
EN

Unix & Linux用户

发布于 2016-10-31 10:26:25

尝试dpkg --install /var/cache/apt/archives/postfix_2.11.3-1_amd64.debapt -f install之后

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

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

复制
相关文章

相似问题

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