1. 程式人生 > >ubuntu中提示找不到make命令的解決方案(command not found)

ubuntu中提示找不到make命令的解決方案(command not found)

這篇微博轉載自http://blog.csdn.net/fenglibing/article/details/7096556,感謝博主。

第一種方式:利用安裝盤修復

今天遇到一ubuntu,別人剛裝的,我下載了ncftp,準備從其它地方把檔案搬過來,把 ncftp下載回來解壓縮,照原來的安裝方式進行安裝,執行:

    make install

提示我找不到make命令:

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

我嘗試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

嘗試通過關鍵詞:

The program 'make' is currently not installed

Package make is not available, but is referred to by another package

進行GOOGLE,基本上沒有人碰到我這樣的情況,找不到相應的答案,最終求助高手,通過以下的方式進行搞定:

1、先放入UBUNTU安裝盤到光碟中;

2、再按順序執行以下的命令:

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

就可以搞定了。

第二種方式:更新源後apt-get安裝make

命令:sudo apt-get install make

可能會遇到問題:E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 25165824. (man 5 apt.conf)

http://www.cnblogs.com/oyjj/archive/2011/01/08/2132917.html

錯誤內容為:E: Dynamic MMap ran out of room. Please increase the size of APT::Cache-Limit. Current value: 25165824. (man 5 apt.conf)
在網路上找到的一些方法,要麼不能用了,要麼就換源。後來在國外一個網站找到了解決方法。該方法是在ubuntu下成功的。
終端下 輸入命令 sudo gedit /etc/apt/apt.conf.d/70debconf
gedit 是文字編輯軟體,也可以用emacs等軟體。在ubuntu10.04下,70debconf 是快取配置檔案,在其他的一些linux系統中可能在./apt目錄下就有配置檔案了。
在開啟的檔案中新增一行 APT::Cache-Limit 33554432;(後面的這個分號一定要加上)
33554432是快取大小,儘量大吧。儲存就over了。

然後在執行sudo  apt-get install make