7

Ubuntu使用apt安装本地deb软件包

 3 years ago
source link: https://www.lujun9972.win/blog/2018/11/18/ubuntu%E4%BD%BF%E7%94%A8apt%E5%AE%89%E8%A3%85%E6%9C%AC%E5%9C%B0deb%E8%BD%AF%E4%BB%B6%E5%8C%85/index.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Ubuntu使用apt安装本地deb软件包

平常都是用 dpkg -i 来安装本地deb软件包。但是 dpkg 不会自动安装依赖包,因此安装很容易出现依赖相关的错误。 之后需要通过运行 sudo apt-get install -f 来安装依赖

但是今天我才知道,原来可以直接通过 apt/apt-get 来安装本地deb包,只需要为 apt/apt-get 指定deb包的 相对路径或绝对路径 就行了,像这样:

sudo apt install -y ./teamviewer_amd64.deb
sudo apt-get install -y ./teamviewer_amd64.deb

这里要注意的是不要直接在 apt 命令后指定deb包的名字,必须有路径信息,否则 apt 命令会尝试从远程仓库中搜索deb包同名的package,从而导致安装失败。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK