Linux之軟件不同安裝方法與卸載方法

目前個人所學到的Linux 中軟件安裝方法有如下二種(本人使用的是ubunt 系統):
1.使用命令直接安裝編譯好的軟件:apt-get install xxx
2.源碼安裝

下面對二種安裝的卸載方式分別做個介紹。以axel 爲例。
1.使用命令直接聯網安裝;

//安裝axel
apt-get install axel
//卸載axel
apt-get remove axel

2.使用源碼安裝,下載源碼:https://sourceforge.net/projects/axel2/
解壓進入源碼目錄後,執行如下命令:

# ./configure
# make
# make install

執行axel 可以看到電腦已安裝axel:

C_PROJECT/axel-2.4# axel
Usage: axel [options] url1 [url2] [url...]

--max-speed=x		-s x	Specify maximum speed (bytes per second)
--num-connections=x	-n x	Specify maximum number of connections
--output=f		-o f	Specify local output file
--search[=x]		-S [x]	Search for mirrors and download from x servers
--header=x		-H x	Add header string
--user-agent=x		-U x	Set user agent
--no-proxy		-N	Just don't use any proxy server
--quiet			-q	Leave stdout alone
--verbose		-v	More status information
--alternate		-a	Alternate progress indicator
--help			-h	This information
--version		-V	Version information


源碼安裝軟件的卸載,大部分編寫Makefile都會支持卸載相關安裝軟件:
make uninstall

ROJECT/axel-2.4# make uninstall
rm -f /usr/local/bin/axel
rm -f /usr/local/etc/axelrc
rm -f /usr/local/share/man/man1/axel.1
rm -f /usr/local/share/man/zh_CN/man1/axel.1
cd /usr/local/share/locale; find . -name axel.mo -exec 'rm' '{}' ';'
root@ubuntu:/mnt/hgfs/SHAREZDG/C_PROJECT/axel-2.4# 
root@ubuntu:/mnt/hgfs/SHAREZDG/C_PROJECT/axel-2.4# 
root@ubuntu:/mnt/hgfs/SHAREZDG/C_PROJECT/axel-2.4# axel
bash: /usr/local/bin/axel: No such file or directory

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章