Unable to locate package
程序员文章站
2022-07-14 15:34:45
...
Unable to locate package
在进行ftp和web服务器安装时采用apt-get方式安装一些软件,却总是报出这个错误:Unable to locate package,试了许多办法,改了许多配置文件就是没用,最后才知道是要更新update和upgrade。
1.sudo apt-get install update
sudo apt-get install upgrade
2.但是upgrade时又报错了,就是现实不能安装。
3.上网查了,是要换成阿里云镜像。
4.阿里云镜像如下:
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties deb http://archive.canonical.com/ubuntu xenial partner deb-src http://archive.canonical.com/ubuntu xenial partner deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
5.具体步骤:
5.1 cd /etc/apt/
5.2 ls
5.3 sudo mv sources.list sources.list_bak
5.4 使用记事本(或者Vim等其他编辑器)修改源列表 sudo gedit sources.list
5.5粘贴所有阿里云源地址,保存,注意先将以前的全部删除,然后再粘贴。
6. 然后再升级更新列表 sudo apt-get install update
7. sudo apt-get install upgrade
8. 接下来就可以畅通无阻的下载自己想要的了。
下一篇: Expect脚本学习
推荐阅读
-
android 调试崩溃Unable to instantiate application的解决方法
-
linux中locate命令使用介绍(快速搜寻档案)
-
linux系统启动weblogic受管服务器报unable to get file lock, will ret_daring的解决
-
更改linux软件源产生的Unable to locate package错误解决办法
-
unable to boot - please use a kernel appropriate for your cpu的解决方法
-
解决Mono For Android不能编译问题:Could not create the Android package
-
Python模块、包(Package)概念与用法分析
-
在SSIS package中使用FTP
-
下载了包在node_modules中,但没有在package.json中保存该包信息。
-
SQL2008″Unable to read the list of previously r...解决