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

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