distanceN

导航

Ubuntu gcc缺失问题

在安装redis过程中,需要使用make编译源码,但发现linux中缺失gcc,系统为Ubuntu12。

一般情况下,可使用sudo apt-get install gcc或者sudo apt-get install build-essential解决问题。

但是可能出现:

This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package <packagename> has no installation candidate

在这种情况下,可以尝试更换源(但笔者今天更换源之后仍旧无法成功)

更换Ubuntu源的方法请参考:http://www.cnblogs.com/lyp3314/archive/2012/07/18/2597973.html

 

最终解决方法:

如果是使用ISO文件安装的虚拟机,并且系统安装后ISO文件仍旧保留在原来的位置,可直接使用以下命令:

sudo apt-cdrom add
sudo apt-get install build-essential 
 
 

posted on 2017-01-02 23:28  distanceN  阅读(1240)  评论(0)    收藏  举报