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
    • 最新
    • 标签
主页 / server / 问题

问题[dependencies](server)

Martin Hope
THX
Asked: 2020-09-15 01:42:19 +0800 CST

以机器可读格式列出 Systemd 目标单元的依赖项

  • 1

我有一个复杂的 systemd 目标单元,其中包含许多依赖单元。我想列出并解析这些状态,而不会退回到循环中。

'list-dependencies' 子命令仅以(彩色,不以纯 unicode 复制)点的形式给出状态,这不是很好解析。

> systemctl list-dependencies --no-page myunit.target
dcache.target
● ├─mytemplate@unit_foo.service
● ├─mytemplate@unit_bar.service
● ├─mytemplate@unit_baz.service
...

--no-page 标志似乎没有任何影响,并且无论有无输出都保持不变。

或者,

systemctl list-dependencies --plain myunit.target

仅列出依赖项但不列出其当前状态

有没有办法从'systemctl list-dependencies'生成输出,可以解析或者是JSON或类似的?

dependencies systemd systemctl
  • 1 个回答
  • 428 Views
Martin Hope
anskibenko
Asked: 2020-07-01 14:21:40 +0800 CST

在 Amazon Linux (RHEL) 上安装 OpenLiteSpeed Web 服务器

  • 1

我只是想在我的 Amazon Linux 2 实例上安装 OLS,但我在开始和所有最后步骤都收到了错误。以下是关于:

  1. 当我添加指南存储库推荐时,我收到错误:

     failure: repodata/repomd.xml from litespeed: [Errno 256] No more mirrors to try.
    

    http://rpms.litespeedtech.com/centos/8/x86_64/repodata/x86_64/repodata/repomd.xml:[Errno 14] HTTP 错误 404 - 未找到

要修复它,我只需在链接http://rpms.litespeedtech.com/centos/$releasever/$basearch/处将 $releaseserver 替换为 8(我可以在http://rpms.litespeedtech.com/centos/看到) 并且......它有效!但在那之后,当我尝试安装时,我收到这些依赖错误:

Loaded plugins: langpacks, priorities, update-motd
191 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: lsphp73-common(x86-64) = 7.3.18-1.el8 for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1(OPENSSL_1_1_0)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libssl.so.1.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libcrypto.so.1.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: lsphp73-xml for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-process for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-pdo for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-opcache for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-mysqlnd for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-mcrypt for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-mbstring for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-imap for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: lsphp73-gd for package: openlitespeed-1.6.14-1.el8.x86_64
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
--> Running transaction check
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package lsphp73-common.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-common-7.3.18-1.el8.x86_64
---> Package lsphp73-gd.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
---> Package lsphp73-imap.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc-client.so.2007()(64bit) for package: lsphp73-imap-7.3.18-1.el8.x86_64
---> Package lsphp73-mbstring.x86_64 0:7.3.18-1.el8 will be installed
---> Package lsphp73-mysqlnd.x86_64 0:7.3.18-1.el8 will be installed
---> Package lsphp73-opcache.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-opcache-7.3.18-1.el8.x86_64
---> Package lsphp73-pdo.x86_64 0:7.3.18-1.el8 will be installed
---> Package lsphp73-pecl-mcrypt.x86_64 0:1.0.3-1.el8.7.3 will be installed
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: lsphp73-pecl-mcrypt-1.0.3-1.el8.7.3.x86_64
---> Package lsphp73-process.x86_64 0:7.3.18-1.el8 will be installed
---> Package lsphp73-xml.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: lsphp73-xml-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
---> Package openssl11-libs.x86_64 1:1.1.1c-3.amzn2.0.1 will be installed
--> Running transaction check
---> Package libX11.x86_64 0:1.6.7-2.amzn2 will be installed
--> Processing Dependency: libX11-common >= 1.6.7-2.amzn2 for package: libX11-1.6.7-2.amzn2.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-2.amzn2.x86_64
---> Package libXpm.x86_64 0:3.5.12-1.amzn2.0.2 will be installed
---> Package libc-client.x86_64 0:2007f-16.el7 will be installed
---> Package libmcrypt.x86_64 0:2.5.8-13.el7 will be installed
---> Package libxslt.x86_64 0:1.1.28-5.amzn2.0.2 will be installed
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package lsphp73-common.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-common-7.3.18-1.el8.x86_64
---> Package lsphp73-gd.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
---> Package lsphp73-opcache.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-opcache-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
--> Running transaction check
---> Package libX11-common.noarch 0:1.6.7-2.amzn2 will be installed
---> Package libxcb.x86_64 0:1.12-1.amzn2.0.2 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.12-1.amzn2.0.2.x86_64
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package lsphp73-common.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-common-7.3.18-1.el8.x86_64
---> Package lsphp73-gd.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
---> Package lsphp73-opcache.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-opcache-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
--> Running transaction check
---> Package libXau.x86_64 0:1.0.8-2.1.amzn2.0.2 will be installed
---> Package lsphp73.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
--> Processing Dependency: libargon2.so.1()(64bit) for package: lsphp73-7.3.18-1.el8.x86_64
---> Package lsphp73-common.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-common-7.3.18-1.el8.x86_64
---> Package lsphp73-gd.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libpng16.so.16(PNG16_0)(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libwebp.so.7()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
--> Processing Dependency: libpng16.so.16()(64bit) for package: lsphp73-gd-7.3.18-1.el8.x86_64
---> Package lsphp73-opcache.x86_64 0:7.3.18-1.el8 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.27)(64bit) for package: lsphp73-opcache-7.3.18-1.el8.x86_64
---> Package openlitespeed.x86_64 0:1.6.14-1.el8 will be installed
--> Processing Dependency: libnsl for package: openlitespeed-1.6.14-1.el8.x86_64
--> Finished Dependency Resolution
Error: Package: lsphp73-opcache-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libc.so.6(GLIBC_2.27)(64bit)
Error: Package: lsphp73-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libargon2.so.1()(64bit)
Error: Package: lsphp73-gd-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libwebp.so.7()(64bit)
Error: Package: openlitespeed-1.6.14-1.el8.x86_64 (litespeed)
           Requires: libnsl
Error: Package: lsphp73-common-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libc.so.6(GLIBC_2.27)(64bit)
Error: Package: lsphp73-gd-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libpng16.so.16(PNG16_0)(64bit)
Error: Package: lsphp73-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libc.so.6(GLIBC_2.27)(64bit)
Error: Package: lsphp73-gd-7.3.18-1.el8.x86_64 (litespeed)
           Requires: libpng16.so.16()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我不知道如何解决它。感谢您的回复。

linux yum dependencies amazon-web-services litespeed
  • 2 个回答
  • 624 Views
Martin Hope
PeptideChain
Asked: 2020-06-15 01:15:22 +0800 CST

理解和解决对 Centos 7 的依赖

  • 1

多年来,我作为爱好者管理员解决了许多依赖关系问题:我只是删除了一些包,直到整个事情得到解决,或者(如果后果会很大)等到问题自行解决。

# cat /etc/centos-release
CentOS Linux release 7.8.2003 (Core)

现在我想了解以下内容的含义:

# yum update
Loaded plugins: fastestmirror, replace
Loading mirror speeds from cached hostfile
 * base: ...
 * epel: ...
 * extras: ...
 * updates: ...
 * webtatic: ...
Resolving Dependencies
--> Running transaction check
---> Package ImageMagick.x86_64 0:6.7.8.9-18.el7 will be updated
--> Processing Dependency: libMagickCore.so.5()(64bit) for package: php72w-pecl-imagick-3.4.3-1.2.w7.x86_64
--> Processing Dependency: libMagickWand.so.5()(64bit) for package: php72w-pecl-imagick-3.4.3-1.2.w7.x86_64
---> Package ImageMagick.x86_64 0:6.9.10.68-3.el7 will be an update
--> Finished Dependency Resolution
Error: Package: php72w-pecl-imagick-3.4.3-1.2.w7.x86_64 (@webtatic)
           Requires: libMagickCore.so.5()(64bit)
           Removing: ImageMagick-6.7.8.9-18.el7.x86_64 (@base)
               libMagickCore.so.5()(64bit)
           Updated By: ImageMagick-6.9.10.68-3.el7.x86_64 (base)
               Not found
Error: Package: php72w-pecl-imagick-3.4.3-1.2.w7.x86_64 (@webtatic)
           Requires: libMagickWand.so.5()(64bit)
           Removing: ImageMagick-6.7.8.9-18.el7.x86_64 (@base)
               libMagickWand.so.5()(64bit)
           Updated By: ImageMagick-6.9.10.68-3.el7.x86_64 (base)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我想系统ImageMagick.x86_64将从0:6.7to更新,0:6.9但它无法做到。然后我的猜测:删除0:6.7会删除libMagickCore.so.5,但最后一个是需要的php72w-pecl-imagick-3.4.3-1.2.w7.x86_64……那为什么不直接留libMagickCore.so.5在系统中呢?可能是因为需要一个新的,但我看不出是哪一个......

我真的不明白幕后发生了什么。

yum dependencies update centos7
  • 1 个回答
  • 1786 Views
Martin Hope
Fel
Asked: 2020-05-27 18:41:48 +0800 CST

由于 libc6 版本,无法升级 certbot

  • 0

我正在尝试使用 Python 2.7.9 将 Certbot 从 0.10.2 更新到支持 Debian 9.1 中的 ACME 2 的某个版本。


apt-cache policy certbot
certbot:
  Installed: 0.10.2-1
  Candidate: 0.28.0-1~deb9u2
  Version table:
     0.28.0-1~deb9u2 500
        500 http://deb.debian.org/debian oldstable/main amd64 Packages
        500 http://deb.debian.org/debian oldstable-updates/main amd64 Packages
     0.28.0-1~bpo9+1 100
        100 http://ftp.debian.org/debian stretch-backports/main amd64 Packages
 *** 0.10.2-1 100
        100 /var/lib/dpkg/status

从这里开始,这就是我正在尝试的:


echo "deb http://ftp.debian.org/debian stretch-backports main">>/etc/apt/sources.list
apt-get update
apt-get install python-certbot-nginx -t stretch-backports

/etc/apt/sources.list

deb http://deb.debian.org/debian/ oldstable main contrib non-free
deb-src http://deb.debian.org/debian/ oldstable main contrib non-free

deb http://deb.debian.org/debian/ oldstable-updates main contrib non-free
deb-src http://deb.debian.org/debian/ oldstable-updates main contrib non-free

deb http://deb.debian.org/debian-security oldstable/updates main
deb-src http://deb.debian.org/debian-security oldstable/updates main

deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main

||/ Name                                Version                Architecture           Description
+++-===================================-======================-======================-============================================================================
ii  libc6:amd64                         2.24-11+deb9u1         amd64                  GNU C Library: Shared libraries

错误:

apt-get install python-certbot-nginx -t stretch-backports
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:
 libc-dev-bin : Depends: libc6 (> 2.28) but 2.24-11+deb9u1 is to be installed
                Recommends: manpages-dev but it is not going to be installed
 libc6-dev : Depends: libc6 (= 2.28-10) but 2.24-11+deb9u1 is to be installed
 locales : Depends: libc-bin (> 2.28) but 2.24-11+deb9u1 is to be installed
 python-certbot-nginx : Depends: python3-certbot-nginx but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

libc6:
Installed: 2.24-11+deb9u1
  Candidate: 2.24-11+deb9u4
  Version table:
     2.24-11+deb9u4 500
        500 http://deb.debian.org/debian oldstable/main amd64 Packages
 *** 2.24-11+deb9u1 500
        500 http://deb.debian.org/debian-security oldstable/updates/main amd64 Packages
        100 /var/lib/dpkg/status
libc6-dev:
  Installed: 2.28-10
  Candidate: 2.28-10
  Version table:
 *** 2.28-10 100
        100 /var/lib/dpkg/status
     2.24-11+deb9u4 500
        500 http://deb.debian.org/debian oldstable/main amd64 Packages
     2.24-11+deb9u1 500
        500 http://deb.debian.org/debian-security oldstable/updates/main amd64 Packages
locales:
  Installed: 2.28-10
  Candidate: 2.28-10
  Version table:
 *** 2.28-10 100
        100 /var/lib/dpkg/status
     2.24-11+deb9u4 500
        500 http://deb.debian.org/debian oldstable/main amd64 Packages
     2.24-11+deb9u1 500
        500 http://deb.debian.org/debian-security oldstable/updates/main amd64 Packages
libc-dev-bin:
  Installed: 2.28-10
  Candidate: 2.28-10
  Version table:
 *** 2.28-10 100
        100 /var/lib/dpkg/status
     2.24-11+deb9u4 500
        500 http://deb.debian.org/debian oldstable/main amd64 Packages
     2.24-11+deb9u1 500
        500 http://deb.debian.org/debian-security oldstable/updates/main amd64 Packages

任何想法?这是一个生产服务器。

编辑:

所以显然我已经在 Debian 9 中安装了一些来自 Debian 10 的软件包。因为我不能用 apt 做任何事情,所以我试图用 aptitude 解决依赖关系。

(venv)root@deb64:/home/x/# aptitude -V -s install libc6-dev=2.24-11+deb9u4
The following packages will be DOWNGRADED:
  libc6-dev{b} [2.28-10 -> 2.24-11+deb9u4]
The following packages will be REMOVED:
  libc-dev-bin{u} [2.28-10]
The following packages will be upgraded:
  libc6 [2.24-11+deb9u1 -> 2.24-11+deb9u4]  linux-libc-dev [4.9.30-2+deb9u5 -> 4.9.210-1]
The following partially installed packages will be configured:
  libc-l10n  locales{b}  man-db
2 packages upgraded, 0 newly installed, 1 downgraded, 1 to remove and 235 not upgraded.
Need to get 6,539 kB of archives. After unpacking 3,561 kB will be freed.
The following packages have unmet dependencies:
 libc6-dev : Depends: libc-dev-bin (= 2.24-11+deb9u4) but it is not going to be installed
 locales : Depends: libc-bin (> 2.28) but 2.24-11+deb9u1 is installed and it is kept back
The following actions will resolve these dependencies:

     Remove the following packages:
1)     locales [2.28-10 (now)]
2)     task-english [3.39 (now, oldstable)]

     Install the following packages:
3)     locales-all [2.24-11+deb9u4 (oldstable)]

     Upgrade the following packages:
4)     postgresql-9.4 [9.4.13-0+deb8u1 (now) -> 9.4.26-2.pgdg90+1 (stretch-pgdg)]
5)     postgresql-9.6 [9.6.4-0+deb9u1 (now) -> 9.6.18-1.pgdg90+1 (stretch-pgdg)]
6)     postgresql-contrib-9.4 [9.4.13-0+deb8u1 (now) -> 9.4.26-2.pgdg90+1 (stretch-pgdg)]
7)     postgresql-contrib-9.6 [9.6.4-0+deb9u1 (now) -> 9.6.18-1.pgdg90+1 (stretch-pgdg)]

     Downgrade the following packages:
8)     libc-dev-bin [2.28-10 (now) -> 2.24-11+deb9u4 (oldstable)]

Accept this solution? [Y/n/q/?] q

如果我接受此解决方案,系统是否安全?


ii  libc6:amd64                       2.24-11+deb9u1                 amd64        GNU C Library: Shared libraries
iU  libc6-dev:amd64                   2.28-10                        amd64        GNU C Library: Development Libraries and Header Files
debian dependencies certbot libc6
  • 3 个回答
  • 3031 Views
Martin Hope
James B. Byrne
Asked: 2020-05-23 11:14:46 +0800 CST

无法在 debian 10.4 上安装 sshd (openssh-server)

  • 0

这是 Debian-10.4 的全新安装。sources.list 文件如下:

# deb cdrom:[Debian GNU/Linux 10.4.0 Buster - Official amd64 DVD Binary-1 20200 0509-10:26]/ buster contrib main

deb http://security.debian.org/debian-security buster/updates main contrib
deb-src http://security.debian.org/debian-security buster/updates main contrib

# buster-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://deb.debian.org/debian/ buster-updates main contrib
deb-src http://deb.debian.org/debian/ buster-updates main contrib

当我尝试安装 sshd (openssh-serverr) 我得到这个:

[root@smb4-a ~]# apt install -f openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:7.9p1-10+deb10u1) but 1:7.9p1-10+deb10u2 is to be installed
                  Depends: openssh-sftp-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我什至不会去想象什么样的发行版不提供作为基本安装的一部分的安全远程访问。无论 Debian 的原因是什么,我都需要这样。问题似乎是这样的:

 openssh-server : Depends: openssh-client (= 1:7.9p1-10+deb10u1) but 1:7.9p1-10+deb10u2 is to be installed

如何强制安装损坏的依赖项?

更多信息:

[root@smb4-a ~]# apt-get update
Get:1 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Get:3 http://deb.debian.org/debian buster-updates/main Sources [3,088 B]
Get:4 http://deb.debian.org/debian buster-updates/main amd64 Packages [7,380 B]
Get:5 http://deb.debian.org/debian buster-updates/main Translation-en [5,166 B]
Fetched 64.9 kB in 0s (358 kB/s)           
Reading package lists... Done
[root@smb4-a ~]# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

更多信息:

# apt policy openssh-*
openssh-sftp-server:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-tests:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-server:
  Installed: (none)
  Candidate: 1:7.9p1-10+deb10u1
  Version table:
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
openssh-client:
  Installed: 1:7.9p1-10+deb10u2
  Candidate: 1:7.9p1-10+deb10u2
  Version table:
 *** 1:7.9p1-10+deb10u2 100
        100 /var/lib/dpkg/status
     1:7.9p1-10+deb10u1 500
        500 http://security.debian.org/debian-security buster/updates/main amd64 Packages
debian installation dependencies ssh apt
  • 2 个回答
  • 9123 Views
Martin Hope
klor
Asked: 2020-02-28 12:10:29 +0800 CST

Debian 9.12 中的 libc6 依赖项不匹配

  • 2

我在 Debian 9.12 中遇到了以下 libc6 依赖问题。

sudo apt install libc6-dev

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libc6-dev : Depends: libc6 (= 2.24-11+deb9u4) but 2.27-6 is to be installed
             Depends: libc-dev-bin (= 2.24-11+deb9u4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我该如何解决?

EDIT1:apt策略libc6

libc6:
  Installed: 2.27-6
  Candidate: 2.27-6
  Version table:
 *** 2.27-6 100
        100 /var/lib/dpkg/status
     2.24-11+deb9u4 500
        500 http://deb.debian.org/debian stretch/main amd64 Packages
     2.24-11+deb9u1 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages

编辑2:

apt install libc6/stretch libc6-dev/stretch libc-dev-bin/stretch
Reading package lists... Done
Building dependency tree
Reading state information... Done
Selected version '2.24-11+deb9u4' (Debian:9.12/oldstable [amd64]) for 'libc6'
Selected version '2.24-11+deb9u4' (Debian:9.12/oldstable [amd64]) for 'libc6-dev'
Selected version '2.24-11+deb9u4' (Debian:9.12/oldstable [amd64]) for 'libc-dev-bin'
The following additional packages will be installed:
linux-libc-dev
Suggested packages:
glibc-doc locales
The following packages will be REMOVED:
libc-bin locales sudo
The following NEW packages will be installed:
libc-dev-bin libc6-dev linux-libc-dev
The following packages will be DOWNGRADED:
libc6
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
libc-bin
0 upgraded, 3 newly installed, 1 downgraded, 3 to remove and 0 not upgraded.
Need to get 6,797 kB of archives.
After this operation, 1,437 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]
linux debian dependencies debian-stretch libc6
  • 2 个回答
  • 9868 Views
Martin Hope
fvm
Asked: 2017-02-20 01:58:53 +0800 CST

使用 mozjpeg 代替 jpeg-turbo,包括满足依赖关系

  • 2

我正在尝试使用 mozjpeg 作为 jpeg-turbo 的替代库。我完全能够获取源代码并根据需要对其进行编译,甚至可以从中创建一个 deb 文件,我可以使用它来安装包(例如apt-get install ./mozjpeg_3.2_amd64.deb)。

为了清楚起见,请注意这两个包应该提供完全相同的接口,因此在功能上是等效的。因此,mozjpeg 应该满足对 jpeg-turbo 的依赖。

好的,继续,当我继续安装依赖包(例如 ghostscript 开发头文件libgs-dev)时,我遇到了错误,因为它们声明了对libjpeg62-turbo-dev:

dpkg: error processing archive /tmp/apt-dpkg-install-HuzNRO/0-libjpeg62-turbo-dev_1%3a1.5.1-2_amd64.deb (--unpack):
trying to overwrite '/usr/include/jerror.h', which is also in package mozjpeg 3.2-20170219

现在,在这一点上出现冲突当然是合乎逻辑的。有没有办法防止这种情况?我可以告诉依赖系统 mozjpeg 满足对 jpeg-turbo 的依赖,以便任何依赖 jpeg-turbo 的包都将使用替​​换安装吗?

提前致谢。

debian installation dependencies apt libraries
  • 1 个回答
  • 529 Views
Martin Hope
Ashish Karpe
Asked: 2017-01-10 02:59:07 +0800 CST

码头工人 npm 错误!安装无法读取依赖项

  • 0

尝试 Docker 教程https://prakhar.me/docker-curriculum/#dockerrun 在运行 root@ip-172-31-22-20:~/docker-curriculum# docker build -t ashishkarpe/foodtrucks-web 时出错。

root@ip-172-31-22-20:~/docker-curriculum# docker build -t ashishkarpe/foodtrucks-web .
Sending build context to Docker daemon 5.32 MB
Step 1 : FROM ubuntu:14.04
---> 3f755ca42730
Step 2 : MAINTAINER Prakhar Srivastav prakhar@prakhar.me
---> Using cache
---> ca0cf0254114
Step 3 : RUN apt-get -yqq update
---> Using cache
---> 4952fb95a34d
Step 4 : RUN apt-get -yqq install python-pip python-dev
---> Using cache
---> 73bd849c6164
Step 5 : RUN apt-get -yqq install nodejs npm
---> Using cache
---> c48d602eccda
Step 6 : RUN ln -s /usr/bin/nodejs /usr/bin/node
---> Using cache
---> 221206c99a7f
Step 7 : ADD flask-app /opt/flask-app
---> Using cache
---> 7ddfac0cdf0e
Step 8 : WORKDIR /opt/flask-app
---> Using cache
---> 451217e08677
Step 9 : RUN npm install
---> Running in 547c36e97297

npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open '/opt/flask-app/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com

npm ERR! System Linux 3.13.0-92-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! cwd /opt/flask-app
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /opt/flask-app/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /opt/flask-app/npm-debug.log
npm ERR! not ok code 0

我的 Docker 文件:

# cat Dockerfile
# start from base
FROM ubuntu:14.04
MAINTAINER Prakhar Srivastav <prakhar@prakhar.me>

# install system-wide deps for python and node
RUN apt-get -yqq update
RUN apt-get -yqq install python-pip python-dev
RUN apt-get -yqq install nodejs npm
RUN ln -s /usr/bin/nodejs /usr/bin/node

# copy our application code
ADD flask-app /opt/flask-app
WORKDIR /opt/flask-app

# fetch app specific deps
RUN npm install
RUN npm run build
RUN pip install -r requirements.txt

# expose port
EXPOSE 5000
ubuntu dependencies docker npm
  • 1 个回答
  • 558 Views
Martin Hope
Nathan Basanese
Asked: 2016-09-10 17:04:00 +0800 CST

Puppet 2.7 是否允许未参数化的“params”类的类继承?

  • 1

运行时出现以下错误puppet-lint:

$ puppet-lint manifests/*
manifests/init.pp - WARNING: class inheriting from params class on line 72

我在duckduckgo.com上快速搜索了一下,得到了这个:

http://puppet-lint.com/checks/class_inherits_from_params_class/

但是,我们的 Puppet Agent 版本都是 2.7 或更高版本,我们的 Puppet Master 都是 3.0 或更高版本。

作为参考,有init.pp问题的代码如下:

class myclass (
    $zone = 'top',
    $::myclass::params::base_url,
    $::myclass::params::username,
) inherits myclass::params {
...

中的代码params.pp如下:

class myclass::params {
    $base_url  = hiera('myclass::base_url','https://beta.tpsreports.com/coversheets/')
    $username = hiera('clap::base_url','prod')
}

即使 Hiera 查找失败,我仍然不应该收到这样的错误:

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Must pass ::myclass::params::base_url to Class[Myclass] at /etc/puppet/manifests/nodes/beta_servers_0.pp:126 on node beta-web-server-0.tpsreports.com

既然我已经讨论了一些背景,我非常愿意添加,如果有人问,我的问题如下:

  1. 如果params即使 hiera 查找以某种方式失败,我的类也会提供参数,为什么我会收到此错误?
  2. 我是否必须使用可怕的解决方法(即 puppet-lint.com 链接中的“你应该做的事情”,即使我的 Puppet 版本高于2.6.2所有情况?
dependencies puppet hiera
  • 1 个回答
  • 76 Views
Martin Hope
shearn89
Asked: 2016-04-26 07:28:41 +0800 CST

Yum 依赖项可用但未标记为安装

  • 1

我正在尝试安装特定版本的 MySQL:mysql-community-server-5.6.29-2.el6在 RedHat 6.6 上。

当我运行时yum install,我得到依赖错误,但依赖显然是可用的。我不确定如何进行。

看起来有些东西在请求MySQL-community-libs-5.7.11-1.el6,但我不知道如何强迫它不要。

有用的输出:

[root@cl-mgr01 ~]# yum install mysql-community-server-5.6.29-2.el6
     ## truncated for brevity ##
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:5.6.29-2.el6 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.29-2.el6 for package: mysql-community-server-5.6.29-2.el6.x86_64
--> Processing Dependency: mysql-community-client(x86-64) = 5.6.29-2.el6 for package: mysql-community-server-5.6.29-2.el6.x86_64
--> Processing Dependency: libnuma.so.1(libnuma_1.2)(64bit) for package: mysql-community-server-5.6.29-2.el6.x86_64
--> Processing Dependency: libnuma.so.1(libnuma_1.1)(64bit) for package: mysql-community-server-5.6.29-2.el6.x86_64
--> Processing Dependency: libnuma.so.1()(64bit) for package: mysql-community-server-5.6.29-2.el6.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:5.6.29-2.el6 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) = 5.6.29-2.el6 for package: mysql-community-client-5.6.29-2.el6.x86_64
---> Package mysql-community-common.x86_64 0:5.6.29-2.el6 will be installed
---> Package numactl.x86_64 0:2.0.9-2.el6 will be installed
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:5.6.29-2.el6 will be obsoleting
---> Package mysql-libs.x86_64 0:5.1.73-3.el6_5 will be obsoleted
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-6.el6_5.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: 2:postfix-2.6.6-6.el6_5.x86_64
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:5.7.11-1.el6 will be obsoleting
--> Processing Dependency: mysql-community-common(x86-64) = 5.7.11-1.el6 for package: mysql-community-libs-5.7.11-1.el6.x86_64
---> Package mysql-community-libs-compat.x86_64 0:5.7.11-1.el6 will be obsoleting
--> Running transaction check
---> Package mysql-community-common.x86_64 0:5.6.29-2.el6 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.29-2.el6 for package: mysql-community-server-5.6.29-2.el6.x86_64
--> Processing Dependency: mysql-community-common(x86-64) = 5.6.29-2.el6 for package: mysql-community-libs-5.6.29-2.el6.x86_64
---> Package mysql-community-common.x86_64 0:5.7.11-1.el6 will be installed
--> Finished Dependency Resolution
Error: Package: mysql-community-server-5.6.29-2.el6.x86_64 (mysql)
           Requires: mysql-community-common(x86-64) = 5.6.29-2.el6
              ...
           Available: mysql-community-common-5.6.29-2.el6.x86_64 (mysql)
               mysql-community-common(x86-64) = 5.6.29-2.el6
              ...
           Installing: mysql-community-common-5.7.11-1.el6.x86_64 (mysql)
               mysql-community-common(x86-64) = 5.7.11-1.el6
Error: Package: mysql-community-libs-5.6.29-2.el6.x86_64 (mysql)
           Requires: mysql-community-common(x86-64) = 5.6.29-2.el6
             ...
           Available: mysql-community-common-5.6.29-2.el6.x86_64 (mysql)
               mysql-community-common(x86-64) = 5.6.29-2.el6
             ...
           Installing: mysql-community-common-5.7.11-1.el6.x86_64 (mysql)
               mysql-community-common(x86-64) = 5.7.11-1.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

其他有用的输出:

[root@cl-mgr01 ~]# rpm -qa | grep mysql
mysql-connector-java-5.1.17-6.el6.noarch
mysql-libs-5.1.73-3.el6_5.x86_64
mysql yum dependencies
  • 2 个回答
  • 2349 Views

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve