ubuntu下make无法安装的问题

本文详细介绍了在Ubuntu系统中遇到make命令未安装的问题解决过程。通过更新系统源并安装build-essential包,成功解决了make命令不可用的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 

发布时间:2015-10-30 10:51:30 来源:linux网站 作者:_莫欺少年穷

在帮同学服务器安装环境过程中,发现,make 命令不能使用,提示:

The program 'make' is currently not installed.  You can install it by typing: 
apt-get install make


尝试:sudo apt-get install make
提示:
Reading package lists... Done 
Building dependency tree        
Reading state information... Done 

Package make 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 'make' has no installation candidate 


网络是可以连通的,后来尝试: sudo apt-get update
最后提示[Waiting for headers] 说明系统的 源 无法使用;
 
更新ubuntu源:
1、首先备份Ubuntu源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表,有备无患嘛)
2、修改更新源
sudo vim /etc/apt/sources.list (打开Ubuntu 12.04源列表文件)

3、将下面的代码粘贴进去(“#”开头的那一行为注释,可以直接复制进文件中)
4、通知ubuntu启用新的更新源   sudo apt-get update
5、之后运行 sudo apt-get install build-essential


完成后就可以使用make 命令了。


Make命令教程详解:http://www.linuxdiyf.com/linux/12391.html

阮一峰:Make命令教程:http://www.linuxdiyf.com/linux/8713.html

Ubuntu 12.10 gmake命令找不到:http://www.linuxdiyf.com/linux/1404.html

Linux命令make报错总结:http://www.linuxdiyf.com/linux/5191.html

 

http://www.linuxdiyf.com/linux/15327.html

转载于:https://www.cnblogs.com/pengmn/p/9950583.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值