AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1333199
Accepted
Jonte YH
Jonte YH
Asked: 2021-04-23 06:51:11 +0800 CST2021-04-23 06:51:11 +0800 CST 2021-04-23 06:51:11 +0800 CST

APT 更新升级到 21.04 后配置 postfix 时遇到错误

  • 772

我已经从 Ubuntu 20.10 升级到 21.04,现在当我运行时:

sudo apt update
sudo apt-get upgrade

我在下面收到与 PostFix 相关的此错误。

我怎么解决这个问题?

Hit:1 http://archive.ubuntu.com/ubuntu hirsute InRelease
Hit:2 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease
Hit:3 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu hirsute-security InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  gcc-10-base:i386 gnome-shell-extension-desktop-icons libaom0:i386 libaribb24-0:i386 libasync-mergepoint-perl libavcodec-extra58:i386 libavutil56:i386
  libboost-date-time1.71.0 libboost-filesystem1.71.0 libboost-iostreams1.71.0 libboost-locale1.71.0 libboost-python1.71.0 libbrlapi0.7 libcodec2-0.9:i386
  libdav1d4:i386 libfuture-perl libgdk-pixbuf-xlib-2.0-0:i386 libgdk-pixbuf2.0-0:i386 libgomp1:i386 libio-async-loop-epoll-perl libio-async-perl libisl22 libjs-sizzle
  libjuh-java libjurt-java liblibreoffice-java liblinux-epoll-perl libmetrics-any-perl libmp3lame0:i386 libmysqlclient21 libmysqlclient21:i386 libnuma1:i386
  libopencore-amrnb0:i386 libopencore-amrwb0:i386 liborcus-0.15-0 liborcus-parser-0.15-0 libperl5.30 libperl5.30:i386 libpgm-5.2-0 libpodofo0.9.6 libpoppler102
  libpoppler102:i386 libpython3.8-dev libraw19 libre2-8 libreadline5 libridl-java libsereal-perl libshine3:i386 libsnappy1v5:i386 libsnmp35 libsnmp35:i386
  libsoxr0:i386 libspeex1:i386 libstd-rust-1.47 libstruct-dumb-perl libswresample3:i386 libtest-fatal-perl libtest-metrics-any-perl libtest-refcount-perl
  libtwolame0:i386 libunoloader-java libvdpau1:i386 libvo-amrwbenc0:i386 libvpx6:i386 libwavpack1:i386 libwebpmux3:i386 libx264-160:i386 libx265-192:i386
  libxml-writer-perl libxvidcore4:i386 libzvbi0:i386 linux-headers-5.8.0-49 linux-headers-5.8.0-49-generic linux-image-5.8.0-49-generic linux-modules-5.8.0-49-generic
  linux-modules-extra-5.8.0-49-generic mesa-vdpau-drivers:i386 mysql-common node-ansi-align node-arrify node-bl node-bluebird node-boxen node-builtin-modules
  node-call-limit node-camelcase node-ci-info node-cli-boxes node-cliui node-co node-concat-stream node-config-chain node-configstore node-cross-spawn
  node-crypto-random-string node-cyclist node-debbundle-es-to-primitive node-decamelize node-decompress-response node-deep-extend node-define-properties
  node-detect-indent node-detect-newline node-dot-prop node-duplexer3 node-duplexify node-editor node-end-of-stream node-errno node-es-abstract node-es6-promise
  node-execa node-find-up node-flush-write-stream node-from2 node-fs-vacuum node-genfun node-get-caller-file node-get-stream node-got node-has-symbol-support-x
  node-has-to-string-tag-x node-import-lazy node-invert-kv node-is-buffer node-is-npm node-is-obj node-is-object node-is-path-inside node-is-plain-obj
  node-is-retry-allowed node-is-stream node-isurl node-jquery node-json-buffer node-kind-of node-latest-version node-lazy-property node-lcid node-libnpx
  node-locate-path node-lodash node-lodash-packages node-lowercase-keys node-make-dir node-mem node-merge-stream node-mimic-fn node-mimic-response node-minimist
  node-mississippi node-npm-run-path node-object-inspect node-os-locale node-os-tmpdir node-p-cancelable node-p-finally node-p-is-promise node-p-limit node-p-locate
  node-p-timeout node-package-json node-parallel-transform node-path-exists node-path-is-inside node-pify node-prepend-http node-proto-list node-prr node-pseudomap
  node-pump node-pumpify node-qw node-rc node-registry-auth-token node-registry-url node-require-directory node-require-main-filename node-semver-diff node-sha
  node-shebang-command node-shebang-regex node-slide node-sorted-object node-stream-each node-stream-iterate node-stream-shift node-strict-uri-encode node-strip-eof
  node-strip-json-comments node-term-size node-through2 node-timed-out node-typedarray node-uid-number node-unique-string node-unpipe node-url-parse-lax
  node-url-to-options node-which-module node-widest-line node-wrap-ansi node-xdg-basedir node-xtend node-y18n node-yargs node-yargs-parser ocl-icd-libopencl1:i386
  perl-modules-5.30 python3.8 python3.8-dev python3.8-minimal python3.8-venv shim ure-java vdpau-driver-all:i386
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up postfix (3.5.6-1) ...

Postfix (main.cf) 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 'systemctl reload postfix'.

Running newaliases
newaliases: warning: valid_hostname: misplaced delimiter: kubernetes-worker..
newaliases: fatal: file /etc/postfix/main.cf: parameter myhostname: bad parameter value: kubernetes-worker..
dpkg: error processing package postfix (--configure):
 installed postfix package post-installation script subprocess returned error exit status 75
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Errors were encountered while processing:
 postfix
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt
  • 2 2 个回答
  • 2232 Views

2 个回答

  • Voted
  1. Best Answer
    Raffa
    2021-04-23T10:09:02+08:002021-04-23T10:09:02+08:00

    postfix 主配置文件包含无效条目。

    您可以编辑它并修复错误的条目,或者您可以备份它并创建一个空的配置文件,如下所示:

    sudo mv /etc/postfix/main.cf /etc/postfix/main.cf.old
    

    然后运行:

    sudo touch /etc/postfix/main.cf
    

    然后运行:

    sudo postfix reload
    

    有关如何配置 postfix 的更多信息,请参阅此答案。

    • 3
  2. BoboStriker
    2021-08-13T23:58:33+08:002021-08-13T23:58:33+08:00

    我在 Ubuntu 21.04 上遇到了这个确切的问题。Postfix 无法正确安装,在 20.04 上从未出现过问题:

    newaliases: warning: valid_hostname: misplaced delimiter: RebuildAppV1
    ...
    dpkg: error processing package postfix (--configure):
    installed postfix package post-installation script subprocess returned error exit status 75
    Processing triggers for libc-bin (2.33-0ubuntu5) ...
    Errors were encountered while processing:
     postfix
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    事实证明,Postfix install 不能很好地处理您的系统主机名设置为域字符串以外的任何内容,例如。xxx.com

    即使我还没有此服务器的域名,我所要做的就是将主机名更改为“whatever.com”(在卸载并清除 Postfix 之后):

    sudo hostnamectl set-hostname whatever.com 
    

    然后,检查它是否已更改:

    hostname -f
    

    然后重新安装 Postfix。

    • 0

相关问题

  • 如何编写 shell 脚本来安装应用程序列表?

  • 如何查看存档中可用的软件包的所有版本?

  • 是否可以说出我安装的哪些软件包不在原版安装中?

  • 如何删除 PPA?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve