首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在20.04 (焦点) -issue上安装snmp和snmp:i 386软件包

在20.04 (焦点) -issue上安装snmp和snmp:i 386软件包
EN

Ask Ubuntu用户
提问于 2022-03-07 14:42:50
回答 1查看 302关注 0票数 0

注意:这个问题不是关于默认存储库的。

我需要安装最新的健全的软件包,因为我的扫描仪不支持的主要10.29 libsane包括在Ubuntu20.04LTS。最新的libsane包依赖于snmp。最新的葡萄酒还需要i386版本的libsane包,但由于snmp依赖关系,无法安装它。

看起来只允许一个snmp。

执行的任务:

代码语言:javascript
复制
sudo dpkg --add-architecture i386
sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.canonical.com/ubuntu focal InRelease                      
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease                 
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease               
Hit:5 http://archive.ubuntu.com/ubuntu focal-security InRelease                
Hit:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:7 http://archive.ubuntu.com/ubuntu focal/main Translation-en_GB [485 kB]
Get:8 http://archive.ubuntu.com/ubuntu focal/restricted Translation-en_GB [3.860 B]
Get:9 http://archive.ubuntu.com/ubuntu focal/universe Translation-en_GB [319 kB]
Get:10 http://archive.ubuntu.com/ubuntu focal/multiverse Translation-en_GB [105 kB]
Fetched 913 kB in 3s (357 kB/s)                                        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up-to-date.

这样做是可行的:

代码语言:javascript
复制
sudo apt install snmp

这是失败的:

代码语言:javascript
复制
sudo apt install snmp:i386
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.
 dconf-gsettings-backend : Depends: dconf-service (>= 0.36.0-1)
                           Depends: dconf-service (< 0.36.0-1.1~)
 dictionaries-common : Depends: libtext-iconv-perl but it is not going to be installed
 libcurl3-gnutls : Depends: libssh-4 (>= 0.8.0) but it is not going to be installed
 librdf0 : Depends: libraptor2-0 (>= 2.0.14) but it is not going to be installed
           Depends: librasqal3 (>= 0.9.31) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我还试图从.deb安装。这样做是有效的:

代码语言:javascript
复制
wget http://mirrors.kernel.org/ubuntu/pool/main/n/net-snmp/snmp_5.8+dfsg-2ubuntu2.3_amd64.deb

sudo dpkg -i snmp_5.8+dfsg-2ubuntu2.3_amd64.deb

这也起了作用:

代码语言:javascript
复制
wget http://mirrors.kernel.org/ubuntu/pool/main/n/net-snmp/snmp_5.8+dfsg-2ubuntu2.3_i386.deb

sudo dpkg -i snmp_5.8+dfsg-2ubuntu2.3_i386.deb

然而,这个方案仍然失败。要解决这个问题,我必须执行以下操作:

代码语言:javascript
复制
apt --fix-broken install

这将snmp:i386替换为snmp的64位版本。

或者这件事可能有点清楚:

代码语言:javascript
复制
sudo apt install -s --no-install-recommends snmp snmp:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
snmp is already the newest version (5.8+dfsg-2ubuntu2.3).
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.
 snmp : Conflicts: snmp:i386 but 5.8+dfsg-2ubuntu2.3 is to be installed
 snmp:i386 : Conflicts: snmp but 5.8+dfsg-2ubuntu2.3 is to be installed
E: Unable to correct problems, you have held broken packages.

这能用任何方式解决吗?如何安装两个版本的snmp

答案中的前3个命令成功运行,然后:

代码语言:javascript
复制
$ sudo apt-get install snmp:i386

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.
 dconf-gsettings-backend : Depends: dconf-service (>= 0.36.0-1)
                           Depends: dconf-service (< 0.36.0-1.1~)
 dictionaries-common : Depends: libtext-iconv-perl but it is not going to be installed
 librdf0 : Depends: libraptor2-0 (>= 2.0.14) but it is not going to be installed
           Depends: librasqal3 (>= 0.9.31) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
EN

回答 1

Ask Ubuntu用户

发布于 2022-03-07 16:10:58

首先,您必须从系统中恢复官方的默认存储库和与ppa-purge第三方snmp相关的PPA。

然后,您必须尝试以下黑客:

代码语言:javascript
复制
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libsnmp35:i386
sudo apt-get install snmp:i386

另外,您应该知道,使用低级别dpkg工具安装软件包是危险的,它可能会破坏您的系统。

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

https://askubuntu.com/questions/1396402

复制
相关文章

相似问题

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