当前位置:首页 > 分享 > debian系统apt-get命令无法使用的解决办法

debian系统apt-get命令无法使用的解决办法

时间:2016-09-22 22:04:14 来源:xwidea.com 作者:xwidea.com 点击:1327次

在debian系统里面想安装gcc 结果安装不了,提示如下错误:

Reading package lists... Done

Building dependency tree... Done

Package gcc is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

E: Package gcc has no installation candidate

下面就来讲解一下解决办法

vi /etc/apt/sources.list 

编辑这个文件,在里面加入一行:

debe ftp.cn.debian.org/debian/ stable main  这里面的地址选择服务器所在的地区为最佳,可以在https://www.debian.org/mirror/list 这个地方获取

:wq保存

然后运行 apt-get update更新源后即可使用apt-get进行安装所需要的组件

网友评论
评论人:
评论内容:
验证码: