apt
更新于 2022-01-20
不安装推荐
| Bash |
|---|
| sudo apt install --no-install-recommends --no-upgrade xxx
|
apt代理更新
| Bash |
|---|
| 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.
修复如下:
| Text Only |
|---|
| sudo apt install zlib1g=1:1.2.8.dfsg-2ubuntu4
|
离线包
| Bash |
|---|
| #--download-only
sudo apt install xxx -d
#查看离线包
ll /var/cache/apt/archives
|