ubuntu20.04安装deb包
安装 deb ubuntu20.04
2023-06-13 09:14:22 时间
ubuntu20.04安装本地deb包
apt-get安装
我们知道,一般ubuntu系统安装软件使用apt-get install -y <package-name>,不过这种安装依赖源,依赖源在文件/etc/apt/sources.list中存放
腾讯tke集群默认的Ubuntu20.04依赖源参考如下:
deb http://mirrors.tencentyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.tencentyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.tencentyun.com/ubuntu/ focal-updates main restricted universe multiverse
#deb http://mirrors.tencentyun.com/ubuntu/ focal-proposed main restricted universe multiverse
#deb http://mirrors.tencentyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.tencentyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.tencentyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.tencentyun.com/ubuntu/ focal-updates main restricted universe multiverse
#deb-src http://mirrors.tencentyun.com/ubuntu/ focal-proposed main restricted universe multiverse
#deb-src http://mirrors.tencentyun.com/ubuntu/ focal-backports main restricted universe multiverse
dpkg安装
如果依赖源里没有安装包,需要用google搜索下载deb安装包并安装
ubuntu内置的dpkg工具,可以安装/卸载deb包软件,这里以google-chrome-stable为例
安装命令: dpkg -i <package_version_arch.deb>
卸载命令: dpkg -r <package>
下载google-chrome-stable包
从google上搜索google-chrome-stable的deb包并复制链接,然后使用wget命令下载
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
wget命令下载结果如下
安装google-chrome-stable
下载好deb包后使用dpkg安装
dpkg -i google-chrome-stable_current_amd64.deb
可以看到安装报错,提示多个依赖包没有安装。这是因为dpkg不会自动安装deb包的依赖包,需要提前安装好。如果想用自动安装依赖包,可以使用gdebi工具
先把安装的google-chrome-stable卸载清理掉,注意卸载软件dpkg -r后面需要填写包名,而不是deb文件
dpkg -r google-chrome-stable
gdebi安装
ubuntu默认不会安装gdebi工具,需要使用apt-get安装
apt-get install gdebi -y
安装好之后测试命令是否正常安装
gdebi --version
如下图表示安装成功
使用gdebi安装deb包
gdebi google-chrome-stable_current_amd64.deb
可以看到执行结果,正常安装依赖包
安装好之后使用如下命令查看google-chrome是否安装成功
google-chrome --version
安装成功如下:
卸载的话还是使用dpkg命令即可
dpkg -r google-chrome-stable
相关文章
- linux .deb 安装_快速提示:如何在Linux中安装.deb和.tar文件
- ubuntu18.04 安装CUDA9.0 + CUDNN7 deb安装
- ubuntu命令行安装deb_ubuntu命令行安装deb软件
- ubuntu下deb包安装方法_ubuntu安装下载文件
- 2020idea安装教程_3dmax2020安装失败
- MySQL基础知识(二)-超详细 Linux安装MySQL5.7完整版教程及遇到的坑
- PDF阅读器 PDF Acrobat Reader DC 2020中文版软件安装包免费下载以及安装教程
- Redhat 5.5下安装MongoDB详解大数据
- 安装 Linux:完整硬盘实现梦想(linux安装硬盘)
- 安装Linux下快速RZ覆盖安装的指南(linuxrz覆盖)
- 安装程序Deb 包的 Linux 安装程序(linux.deb)
- 在 Ubuntu Linux 上安装 Deb 文件的 3 种方法
- 快速掌握!Linux 安装 deb 包的详细教程(linux怎么安装deb)
- 安装64位MySQL,开启数据库之旅(64位mysql安装版)
- 安装Linux系统:从deb文件下载开始(linuxdeb下载)
- 安装MSSQL数据库,拓展你的网络体验(安装mssql扩展)
- Deb包在Linux系统上的安装与配置(linux deb 安装)
- bat安装MySQL遭遇的坑提前发现再报错(bat安装mysql的坑)