Ubuntu install E: Unmet dependencies. Try ‘apt –fix-broken install’ with no packages (or specify a solution)

释放双眼,带上耳机,听听看~!
🤖 由 ChatGPT 生成的文章摘要

使用apt安装wireguard出现以下报错

root@frps:~# apt install wireguard
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 apache2-utils : Depends: libapr1 (>= 1.4.8-2~) but it is not going to be installed
                 Depends: libaprutil1 (>= 1.5.0) but it is not going to be installed
 wireguard : Depends: wireguard-dkms (>= 0.0.20200121-2) but it is not going to be installed or
                      wireguard-modules (>= 0.0.20191219)
             Depends: wireguard-tools (>= 1.0.20200513-1~20.04.2) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

解决办法

apt-get -f install=apt-get install -f ,是修复依赖关系(depends)的命令,就是假如你的系统上有某个package不满足依赖条件,这个命令就会自动修复,安装那个package依赖的package。

root@frps:/etc/apt/sources.list.d#  apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  amd64-microcode dblatex dblatex-doc dh-strip-nondeterminism docbook-dsssl docbook-utils docbook-xml docbook-xsl dvisvgm dwz eatmydata fonts-gfs-baskerville fonts-gfs-porson fonts-lmodern
  libalgorithm-c3-perl libapache-pom-java libarchive-cpio-perl libarchive-zip-perl libauthen-sasl-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libcairo2 libclass-c3-perl libclass-c3-xs-perl
  libclass-data-inheritable-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libcommons-logging-java libcommons-parent-java libdata-dump-perl libdata-optlist-perl libdatrie1 libdbus-glib-1-2
  libdebhelper-perl libdevel-callchecker-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdevel-stacktrace-perl libdist-checkconflicts-perl libdynaloader-functions-perl
  libeatmydata1 libemail-date-format-perl libencode-locale-perl libeval-closure-perl libexception-class-perl libfile-basedir-perl libfile-desktopentry-perl libfile-homedir-perl libfile-listing-perl
  libfile-mimeinfo-perl libfile-stripnondeterminism-perl libfile-which-perl libfont-afm-perl libfontbox-java libgraphite2-3 libharfbuzz-icu0 libharfbuzz0b libhtml-form-perl libhtml-format-perl
  libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl
  libio-stringy-perl libipc-shareable-perl libipc-system-simple-perl libjpeg62 libkpathsea6 liblog-dispatch-perl liblog-log4perl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl
  libmime-charset-perl libmime-lite-perl libmime-types-perl libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libnet-dbus-perl
  libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libosp5 libostyle1c2 libpackage-stash-perl libpackage-stash-xs-perl libpadwalker-perl libparams-classify-perl libparams-util-perl
  libparams-validationcompiler-perl libpdfbox-java libpixman-1-0 libptexenc1 libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl libsgmls-perl libsombok3 libspecio-perl
  libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-name-perl libsub-override-perl libsub-quote-perl libsynctex2 libteckit0 libtexlua53 libtexluajit2
  libthai-data libthai0 libtie-ixhash-perl libtimedate-perl libtry-tiny-perl libunicode-linebreak-perl liburi-perl libvariable-magic-perl libwoff1 libwww-perl libwww-robotrules-perl libx11-protocol-perl
  libxcb-render0 libxcb-shm0 libxcursor1 libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl libxstring-perl libyaml-tiny-perl libzzip-0-13 lmodern openjade opensp perl-openssl-defaults
  preview-latex-style python3-importlib-metadata python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe python3-more-itertools python3-pyrsistent python3-zipp sgml-base
  sgml-data sgmlspl squashfs-tools t1utils teckit tex-common tex-gyre texlive texlive-base texlive-bibtex-extra texlive-binaries texlive-extra-utils texlive-fonts-recommended texlive-formats-extra
  texlive-lang-greek texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-pictures texlive-plain-generic texlive-science texlive-xetex thermald tipa x11-xserver-utils xdg-utils
  xfonts-encodings xfonts-utils xml-core xmlto xsltproc
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libapr1 libaprutil1
The following NEW packages will be installed:
  libapr1 libaprutil1
0 upgraded, 2 newly installed, 0 to remove and 381 not upgraded.
1 not fully installed or removed.
Need to get 176 kB of archives.
After this operation, 567 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tencentyun.com/ubuntu focal/main amd64 libapr1 amd64 1.6.5-1ubuntu1 [91.4 kB]
Get:2 http://mirrors.tencentyun.com/ubuntu focal-security/main amd64 libaprutil1 amd64 1.6.1-4ubuntu2.2 [85.1 kB]
Fetched 176 kB in 0s (567 kB/s)        
Selecting previously unselected package libapr1:amd64.
(Reading database ... 145274 files and directories currently installed.)
Preparing to unpack .../libapr1_1.6.5-1ubuntu1_amd64.deb ...
Unpacking libapr1:amd64 (1.6.5-1ubuntu1) ...
Selecting previously unselected package libaprutil1:amd64.
Preparing to unpack .../libaprutil1_1.6.1-4ubuntu2.2_amd64.deb ...
Unpacking libaprutil1:amd64 (1.6.1-4ubuntu2.2) ...
Setting up libapr1:amd64 (1.6.5-1ubuntu1) ...
Setting up libaprutil1:amd64 (1.6.1-4ubuntu2.2) ...
Setting up apache2-utils (2.4.41-4ubuntu3.15) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...

重新执行安装命令

root@frps:/etc/apt/sources.list.d# sudo apt-get install wireguard
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  amd64-microcode dblatex dblatex-doc dh-strip-nondeterminism docbook-dsssl docbook-utils docbook-xml docbook-xsl dvisvgm dwz eatmydata fonts-gfs-baskerville fonts-gfs-porson fonts-lmodern
  libalgorithm-c3-perl libapache-pom-java libarchive-cpio-perl libarchive-zip-perl libauthen-sasl-perl libb-hooks-endofscope-perl libb-hooks-op-check-perl libcairo2 libclass-c3-perl libclass-c3-xs-perl
  libclass-data-inheritable-perl libclass-method-modifiers-perl libclass-xsaccessor-perl libcommons-logging-java libcommons-parent-java libdata-dump-perl libdata-optlist-perl libdatrie1 libdbus-glib-1-2
  libdebhelper-perl libdevel-callchecker-perl libdevel-caller-perl libdevel-globaldestruction-perl libdevel-lexalias-perl libdevel-stacktrace-perl libdist-checkconflicts-perl libdynaloader-functions-perl
  libeatmydata1 libemail-date-format-perl libencode-locale-perl libeval-closure-perl libexception-class-perl libfile-basedir-perl libfile-desktopentry-perl libfile-homedir-perl libfile-listing-perl
  libfile-mimeinfo-perl libfile-stripnondeterminism-perl libfile-which-perl libfont-afm-perl libfontbox-java libgraphite2-3 libharfbuzz-icu0 libharfbuzz0b libhtml-form-perl libhtml-format-perl
  libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libio-html-perl libio-socket-ssl-perl
  libio-stringy-perl libipc-shareable-perl libipc-system-simple-perl libjpeg62 libkpathsea6 liblog-dispatch-perl liblog-log4perl-perl liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl
  libmime-charset-perl libmime-lite-perl libmime-types-perl libmodule-implementation-perl libmodule-runtime-perl libmro-compat-perl libnamespace-autoclean-perl libnamespace-clean-perl libnet-dbus-perl
  libnet-http-perl libnet-smtp-ssl-perl libnet-ssleay-perl libosp5 libostyle1c2 libpackage-stash-perl libpackage-stash-xs-perl libpadwalker-perl libparams-classify-perl libparams-util-perl
  libparams-validationcompiler-perl libpdfbox-java libpixman-1-0 libptexenc1 libreadonly-perl libref-util-perl libref-util-xs-perl librole-tiny-perl libsgmls-perl libsombok3 libspecio-perl
  libsub-exporter-perl libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl libsub-name-perl libsub-override-perl libsub-quote-perl libsynctex2 libteckit0 libtexlua53 libtexluajit2
  libthai-data libthai0 libtie-ixhash-perl libtimedate-perl libtry-tiny-perl libunicode-linebreak-perl liburi-perl libvariable-magic-perl libwoff1 libwww-perl libwww-robotrules-perl libx11-protocol-perl
  libxcb-render0 libxcb-shm0 libxcursor1 libxml-parser-perl libxml-twig-perl libxml-xpathengine-perl libxstring-perl libyaml-tiny-perl libzzip-0-13 lmodern openjade opensp perl-openssl-defaults
  preview-latex-style python3-importlib-metadata python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe python3-more-itertools python3-pyrsistent python3-zipp sgml-base
  sgml-data sgmlspl squashfs-tools t1utils teckit tex-common tex-gyre texlive texlive-base texlive-bibtex-extra texlive-binaries texlive-extra-utils texlive-fonts-recommended texlive-formats-extra
  texlive-lang-greek texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-pictures texlive-plain-generic texlive-science texlive-xetex thermald tipa x11-xserver-utils xdg-utils
  xfonts-encodings xfonts-utils xml-core xmlto xsltproc
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  dctrl-tools dkms wireguard-dkms wireguard-tools
Suggested packages:
  debtags menu openresolv | resolvconf
The following NEW packages will be installed:
  dctrl-tools dkms wireguard wireguard-dkms wireguard-tools
0 upgraded, 5 newly installed, 0 to remove and 381 not upgraded.
Need to get 469 kB of archives.
After this operation, 2,704 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tencentyun.com/ubuntu focal/main amd64 dctrl-tools amd64 2.24-3 [61.5 kB]
Get:2 http://mirrors.tencentyun.com/ubuntu focal-updates/main amd64 dkms all 2.8.1-5ubuntu2 [66.8 kB]
Get:3 http://mirrors.tencentyun.com/ubuntu focal-security/universe amd64 wireguard-dkms all 1.0.20201112-1~20.04.1 [254 kB]
Get:4 http://mirrors.tencentyun.com/ubuntu focal-updates/universe amd64 wireguard-tools amd64 1.0.20200513-1~20.04.2 [83.3 kB]
Get:5 http://mirrors.tencentyun.com/ubuntu focal-updates/universe amd64 wireguard all 1.0.20200513-1~20.04.2 [3,264 B]
Fetched 469 kB in 1s (798 kB/s)       
Selecting previously unselected package dctrl-tools.
(Reading database ... 145295 files and directories currently installed.)
Preparing to unpack .../dctrl-tools_2.24-3_amd64.deb ...
Unpacking dctrl-tools (2.24-3) ...
Selecting previously unselected package dkms.
Preparing to unpack .../dkms_2.8.1-5ubuntu2_all.deb ...
Unpacking dkms (2.8.1-5ubuntu2) ...
Selecting previously unselected package wireguard-dkms.
Preparing to unpack .../wireguard-dkms_1.0.20201112-1~20.04.1_all.deb ...
Unpacking wireguard-dkms (1.0.20201112-1~20.04.1) ...
Selecting previously unselected package wireguard-tools.
Preparing to unpack .../wireguard-tools_1.0.20200513-1~20.04.2_amd64.deb ...
Unpacking wireguard-tools (1.0.20200513-1~20.04.2) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../wireguard_1.0.20200513-1~20.04.2_all.deb ...
Unpacking wireguard (1.0.20200513-1~20.04.2) ...
Setting up wireguard-tools (1.0.20200513-1~20.04.2) ...
wg-quick.target is a disabled or a static unit, not starting it.
Setting up dctrl-tools (2.24-3) ...
Setting up dkms (2.8.1-5ubuntu2) ...
Setting up wireguard-dkms (1.0.20201112-1~20.04.1) ...
Loading new wireguard-1.0.20201112 DKMS files...
Building for 5.4.0-96-generic
Building initial module for 5.4.0-96-generic
Done.

wireguard.ko:
Running module version sanity check.

Good news! Module version 1.0.20201112 for wireguard.ko
exactly matches what is already found in kernel 5.4.0-96-generic.
DKMS will not replace this module.
You may override by specifying --force.

depmod.............

DKMS: install completed.
Setting up wireguard (1.0.20200513-1~20.04.2) ...
Processing triggers for man-db (2.9.1-1) ...
root@frps:/etc/apt/sources.list.d# 

给TA打赏
共{{data.count}}人
人已打赏
RabbitMQ报错锦集

Zabbix 监控RabbitMQ提示Preprocessing failed for: HTTP/1.1 500 Internal Server Error..content-length: 0

2024-1-3 14:52:27

NGINX报错锦集

普通用户启动Nginx

2024-7-22 15:41:14

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索