用 aptitude 找出合適的降版組合

560次阅读
没有评论

用 aptitude 找出合適的降版組合

在跟 Nvidia 提供的各種驅動程式以及套件奮戰,結果遇到經典的 apt 每次都講的不明不白的老問題,像是依照「NVIDIA Deep Learning TensorRT Documentation」這篇的說明,你需要指定需要的版本安裝對應的套件,像是我這邊就是要裝 CUDA 11 的版本,但系統就跟你說不能裝:

sudo apt install tensorrt=8.5.3.1-1+cuda11.8
Reading package lists… Done
Building dependency tree… Done
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:
tensorrt : Depends: libnvinfer8 (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-plugin8 (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvparsers8 (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvonnxparsers8 (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-bin (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-dev (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-plugin-dev (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvparsers-dev (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvonnxparsers-dev (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
Depends: libnvinfer-samples (= 8.5.3-1+cuda11.8) but 8.6.1.6-1+cuda12.0 is to be installed
E: Unable to correct problems, you have held broken packages.

以前比較簡單的套件可以用 apt-cache showpkg 慢慢看組合自己解,但這種巨大套件實在沒辦法。

在「How do I resolve `The following packages have unmet dependencies`」這邊則是有提到這個問題,下面有給個一般性的通解:用 aptitude 提供降版的組合,每一套組合你都可以選 n 讓他提供另外一套組合,直到你覺得這套組合 OK 了再選擇 y 讓他裝起來。

然後裝完以後記得用 apt-mark hold 把主套件的版本固定住,避免 upgrade 的時候又被搞中爛掉出事。

Read More 

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 
评论(没有评论)
Generated by Feedzy