ubuntu更新源(Package has no installation candidate 的问题)
最近将公司的台式机安装了ubuntu16.04,安装之后,使用apt-get install openssh-server 发现出现:Package 'openssh-server' has no installation candidate 的问题。下面主要讲解一下解决问题的办法:
1、出现上面的问题主要原因是源的问题。于是可以将ubuntu的源修改一下,ubuntu的源文件主要存放在/etc/apt/sources.list文件中,只需要修改里面的内容即可。
(1)首先将系统自带的源进行备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
(2)查找一个可靠的国内源,在这里我使用的是清华大学的源。网址如下:https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ ,进入该网站后,找到ubuntu,点击进去可以看到源文件的内容。(里面可以选择你对应的系统版本号)
(3)利用sudo gedit /etc/apt/sources.list 来修改源文件的内容。即将清华大学的源替换掉原来的源。
(4)执行更新:sudo apt-get update 和sudo pat-get upgrade
但是,这一步执行下来,发现源都更新失败。晚上找了很久,发现原来是由于公司网络的原因。解决的办法是:
将sources.list中所有 http://mirrors.ustc...
都替换为 https://mirrors.ustc... 即可。
(5)最后,大功告成。
ubuntu更新源(Package has no installation candidate 的问题)的更多相关文章
- Ubuntu 出现apt-get: Package has no installation candidate问题
今天在安装软件的时候出现了Package has no installation candidate的问题,如: # apt-get install <packagename> Read ...
- Ubuntu出现apt-get: Package has no installation candidate问题
今天在安装 vim 的时候出现了 Package 'vim' has no installation candidate的问题 解决方法如下:# apt-get update# apt-get upg ...
- Ubuntu无法安装vim怎么办?(Ubuntu 出现apt-get: Package has no installation candidate问题)
apt-get install vim 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 有一些软件包无法被安装.如果您用的是不稳定(unstable)发行版, ...
- Ubuntu apt-get: Package has no installation candidate
今天在安装软件的时候出现了Package has no installation candidate的问题,如: # apt-get install <packagename>Readi ...
- Package has no installation candidate解决方法
今天在安装软件的时候出现了Package has no installation candidate的问题,如:# apt-get install <packagename>Reading ...
- linux apt-get install 错误: Package has no installation candidate
sudo apt-get install vim 在安装vim时报如下错误: Error accoured: This may mean that the package is missing, ha ...
- ubuntu更新源列表
1. 备份源列表 sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup 2.修改更新源 打开源列表 sudo gedit /etc/ap ...
- ubuntu 更新源 或者 apt-get install 出错404 not found ,Failed to fetch
1.考虑是不是能上网 2.用apt-get update ,然后再试试apt-get install 如果apt-get update 也出现很多 404 not found 或者 failed to ...
- Ubuntu 更新源
1.首先备份Ubuntu12.04源列表 sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表) 2.修改更新源 ...
随机推荐
- ps
快速恢复默认值 有些不擅长Photoshop的朋友为了调整出满意的效果真是几经周折,结果发现还是原来的默认效果最好,这下傻了眼,后悔不该当初呀!怎么恢复到默认值呀?试着轻轻点按选项栏上的工具图标,然 ...
- Sql Server如何新建计划任务
打开Sql Server数据库,在管理中找到维护计划功能,右击维护计划选择维护计划向导.如图所示: 打开维护计划向导后,在第一个步骤下输入计划名称. 输入完计划名称后,点击右下角的更改按钮,这里是配置 ...
- Remove Duplicates from Sorted Array II [LeetCode]
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For exampl ...
- PHP之PhpDocument的使用
参考资料: 1.http://manual.phpdoc.org/HTMLSmartyConverter/HandS/ric_INSTALL.html 2.http://blog.csdn.net/s ...
- 油猴 greasemonkey 背景音乐 火狐 chrome 背景音乐
火狐,chrome背景音乐 http://www.w3school.com.cn/tags/tag_audio.asp js插入背景音乐,猴油脚本使用 var audio = document.cre ...
- occ代码分析
临时变量就是local里面的变量擦除变量就是把模型改成擦除标记 void SelectMgr_SelectionManager::LoadMode (const Handle(SelectMgr_Se ...
- T4模板批量生成代码
大家通过比对下,就应该知道怎么玩. T4代码 <#@ template debug="false" hostspecific="true" languag ...
- Apache多端口监听
打开:config/httpd.conf 找到Listen 80 在下面增加你要监听的端口,修改后如下: Listen 80 Listen 81 重启apache服务器
- 一个网络传输框架——zeroMQ 调研笔记
一.它是什么 zeroMQ,一个处理消息传输的库,重点在传输上,看起来它像是在socket上面封装了一层,让我们可以很容易的利用它来做N对M的数据传输,在分布式系统中很方便,在接收端它有round-r ...
- 使用面向 iOS 的本机插件扩展 PhoneGap
本文细致探讨了 Xcode(以 iOS 设备为目标)中的 PhoneGap(也称为 Apache Cordova)应用程序本机插件.如果您刚开始接触 PhoneGap 或者需要回顾 PhoneGap ...