apt
更新于 2022-01-20
不安装推荐
shell
sudo apt install --no-install-recommends --no-upgrade xxxapt代理更新
shell
sudo apt -o Acquire::http::proxy="http://ip:port/" install software-name安装特定版本软件
有时依赖会出现问题,已经安装的包需要依赖的等级高,
例如:
The following packages have unmet dependencies.
zlib1g-dev : Depends: zlib1g (= 1:1.2.8.dfsg-2ubuntu4) but 1:1.2.8.dfsg-2ubuntu4.1 is to be installed
E: Unable to correct problems, you have held broken packages.
修复如下:
sudo apt install zlib1g=1:1.2.8.dfsg-2ubuntu4离线包
shell
#--download-only
sudo apt install xxx -d
#查看离线包
ll /var/cache/apt/archives包依赖检测
shell
apt-cache depends <package-name>