首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >APT握断安装

APT握断安装
EN

Unix & Linux用户
提问于 2018-08-28 08:35:54
回答 1查看 958关注 0票数 2

我正在使用Debian9.5,最近卸载了一个软件包(mariadb),现在,当我尝试安装一个新的软件包时,我一直得到这样的信息:

代码语言:javascript
复制
E: Unable to correct problems, you have held broken packages.

我尝试过这些命令,但没有结果:

代码语言:javascript
复制
sudo dpkg --configure -a
sudo apt-get install -f
apt-get install --fix-broken

我还运行了这个命令来显示损坏的包,但是它没有显示任何内容:

代码语言:javascript
复制
apt-mark showhold

即使当我尝试运行sudo apt-get upgrade时,我也会得到以下结果:

代码语言:javascript
复制
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

然后,我安装了智能包管理器(不知道如何安装),并尝试用sudo aptitude install mysql-server安装新包,它展示了一些东西:

代码语言:javascript
复制
The following packages have unmet dependencies:
 libdbi-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by:
                        - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed

 libfcgi-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by:
                         - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed

 libterm-readkey-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by:
                                 - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed

 libdbd-mysql-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by:
                              - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed

The following actions will resolve these dependencies:

      Keep the following packages at their current version:         
1)      default-mysql-server [Not Installed]                        
2)      libcgi-fast-perl [Not Installed]                            
3)      libdbd-mysql-perl [Not Installed]                           
4)      libdbi-perl [Not Installed]                                 
5)      libfcgi-perl [Not Installed]                                
6)      libterm-readkey-perl [Not Installed]                        
7)      mariadb-server-10.1 [Not Installed]                         
8)      mysql-server [Not Installed]                                

      Leave the following dependencies unresolved:                  
9)      libcgi-pm-perl recommends libcgi-fast-perl (>= 1:2.01)      
10)     mariadb-client-10.1 recommends libdbd-mysql-perl (>= 1.2202)
11)     mariadb-client-10.1 recommends libdbi-perl                  
12)     mariadb-client-10.1 recommends libterm-readkey-perl     

这是apt policy pearl-base的输出:

代码语言:javascript
复制
 perl-base:    
    Installed: 5.26.2-7    
    Candidate: 5.26.2-7    
    Version table:    
 *** 5.26.2-7 500   
    500 http://ftp.us.debian.org/debian testing/main amd64 Packages    
    100 /var/lib/dpkg/status    
 5.24.1-3+deb9u4 500    
    500 http://httpredir.debian.org/debian stretch/main amd64 Packages    
    500 http://ftp.de.debian.org/debian stretch/main amd64 Packages     
    500 http://deb.debian.org/debian stretch/main amd64 Packages        
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2018-08-28 11:47:09

您的存储库中有优先级为500的测试,与稳定的存储库相同;这实际上意味着您正在运行Debian测试,而不是Debian 9.5。(感谢您帮助测试Debian的下一个版本!)

mysql-server目前在测试中不可用,因此apt install mysql-server (或其中的变体)试图在Debian稳定器中安装该版本;但这需要Perl的Debian,而不是Debian测试版本,因此安装不能进行。

要解决这个问题,我推荐恢复到Debian稳定。如果您想继续测试,您必须等待MySQL迁移到那里,或者切换到混合测试/不稳定设置。

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

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

复制
相关文章

相似问题

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