日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 人文社科 > 生活经验 >内容正文

生活经验

Depends, python2.7-minimal (= 2.7.15_rc1-1) 问题解决方法使用 aptitude 安装以及与 apt-get 的区别

發布時間:2023/11/27 生活经验 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Depends, python2.7-minimal (= 2.7.15_rc1-1) 问题解决方法使用 aptitude 安装以及与 apt-get 的区别 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1. 問題現象

使用命令 sudo apt install python2.7 安裝 Python2 時報如下錯誤

wohu@ubuntu1804:/etc/apt$ sudo apt install python2.7
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:python2.7 : Depends: python2.7-minimal (= 2.7.15~rc1-1) but it is not going to be installedDepends: libpython2.7-stdlib (= 2.7.15~rc1-1) but 2.7.17-1~18.04ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

2. 解決方案

2.1 安裝 aptitude

sudo apt-get install aptitude 

2.2 使用 aptitude 安裝 python2.7

sudo aptitude install python2.7

依次選擇 n,y, y

wohu@ubuntu1804:/etc/apt$ sudo aptitude install python2.7The following actions will resolve these dependencies:Keep the following packages at their current version:
1)     python2.7 [Not Installed]                          
2)     python2.7-minimal [Not Installed]                  Leave the following dependencies unresolved:         
3)     python2.7-minimal recommends python2.7             Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:Downgrade the following packages:                                            
1)     libpython2.7 [2.7.17-1~18.04ubuntu1 (now) -> 2.7.15~rc1-1 (bionic)]        
2)     libpython2.7-minimal [2.7.17-1~18.04ubuntu1 (now) -> 2.7.15~rc1-1 (bionic)]
3)     libpython2.7-stdlib [2.7.17-1~18.04ubuntu1 (now) -> 2.7.15~rc1-1 (bionic)] Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:libpython2.7 libpython2.7-minimal libpython2.7-stdlib 
The following NEW packages will be installed:python2.7 python2.7-minimal{a} 
0 packages upgraded, 2 newly installed, 3 downgraded, 0 to remove and 34 not upgraded.
Need to get 4,826 kB of archives. After unpacking 4,105 kB will be used.
Do you want to continue? [Y/n/?] y

3. aptitude 與 apt-get 的區別

aptitudeapt-get 一樣,是 Debian 及其衍生系統中功能極其強大的包管理工具。與 apt-get 不同的是,aptitude 在處理依賴問題上更佳一些。

舉例來說,aptitude 在刪除一個包時,會同時刪除本身所依賴的包。這樣,系統中不會殘留無用的包,整個系統更為干凈。

有的問題 apt-get 解決不了,必須使用 aptitude 解決,有的問題,用 aptitude 解決不了,必須使用 apt-get

  • aptitude 解決得更好的地方: install, remove, reinstall(apt-get無此功能), show(apt-get無此功能), search(apt-get無此功能), hold(apt-get無此功能), unhold(apt-get無此功能),

  • apt-get 解決得更好的地方: source(aptitude無此功能), build-dep (低版本的aptitude沒有build-dep功能)

  • apt-getaptitude 沒什么區別的地方:update, upgrade (apt-get upgrade=aptitude safe-upgrade, apt-get dist-upgrade=aptitude full-upgrgade)

總結

以上是生活随笔為你收集整理的Depends, python2.7-minimal (= 2.7.15_rc1-1) 问题解决方法使用 aptitude 安装以及与 apt-get 的区别的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。