如何卸载源码编译安装的软件

其实是个源码编译安装的逆过程。安装:是先在解压源码包得到的文件夹内进行./configure,然后进行make,再make install进行安装。卸载:进入安装该软件的原代码目录,运行./configure,然后再运行make uninstall(make那一步貌似省了)。如果不行,也可以查看一下Makefile文件,主要是看install部分,从其中找出tar格式的文件被复制到了什么路径,然后进入相应的目录进行删除即可。(不过太麻烦了。。。) 另: 1。在make install的时候养成习惯,利用文件重定向保存安装Log到家目录底下,并起好容易识别的名字。然后在卸在载的时候完全可以通过脚本批量删除这些路径 2。通过updatedb + locate的方式找那些路径,虽然比较笨的方法,但是比较有效哦 ot@localhost Desktop]# cd wget-1.12 [root@localhost wget-1.12]# ls ABOUT-NLS ChangeLog COPYING m4 md5 src aclocal.m4 ChangeLog.README doc MAILING-LIST msdos tests AUTHORS configure GNUmakefile maint.mk NEWS util autogen.sh configure.ac INSTALL Makefile.am po windows build-aux configure.bat lib Makefile.in README [root@localhost wget-1.12]# make uninstall There seems to be no Makefile in this directory. You must run ./configure before running `make'. make: *** [abort-due-to-no-makefile] Error 1 [root@localhost wget-1.12]# ./configure configure: configuring for GNU Wget 1.12 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of gcc... gcc3 checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for ranlib... ranlib checking for _LARGEFILE_SOURCE value needed for large files... no checking whether NLS is requested... yes checking for msgfmt... /usr/bin/msgfmt checking for gmsgfmt... /usr/bin/msgfmt checking for xgettext... /usr/bin/xgettext checking for msgmerge... /usr/bin/msgmerge checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for shared library run path origin... done checking for CFPreferencesCopyAppValue... no checking for CFLocaleCopyCurrent... no checking for GNU gettext in libc... yes checking whether to use NLS... yes checking where the gettext function comes from... libc checking for ranlib... (cached) ranlib checking for flex... flex checking lex output file root... lex.yy checking lex library... -lfl checking whether yytext is a pointer... yes checking for an ANSI C-conforming const... yes checking for inline... inline checking for working volatile... yes checking for ANSI C header files... (cached) yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking size of off_t... 8 checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for unistd.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking utime.h usability... yes checking utime.h presence... yes checking for utime.h... yes checking sys/utime.h usability... no checking sys/utime.h presence... no checking for sys/utime.h... no checking for stdint.h... (cached) yes checking for inttypes.h... (cached) yes checking pwd.h usability... yes checking pwd.h presence... yes checking for pwd.h... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking whether h_errno is declared... yes checking size of short... 2 checking size of int... 4 checking size of long... 4 checking size of long long... 8 checking size of void *... 4 checking for size_t... yes checking for pid_t... yes checking for uint32_t... yes checking for uintptr_t... yes checking for intptr_t... yes checking for int64_t... yes checking for sig_atomic_t... yes checking for working alloca.h... yes checking for alloca... yes checking whether the preprocessor supports include_next... yes checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking stdio_ext.h usability... yes checking stdio_ext.h presence... yes checking for stdio_ext.h... yes checking for termios.h... (cached) yes checking sys/mman.h usability... yes checking sys/mman.h presence... yes checking for sys/mman.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking for wchar.h... (cached) yes checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for stdlib.h... (cached) yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking for unistd.h... (cached) yes checking wctype.h usability... yes checking wctype.h presence... yes checking for wctype.h... yes checking for complete errno.h... yes checking whether strerror_r is declared... yes checking for strerror_r... yes checking whether strerror_r returns char *... yes checking whether stdin defaults to large file offsets... yes checking whether getdelim is declared... yes checking whether getline is declared... yes checking getopt.h usability... yes checking getopt.h presence... yes checking for getopt.h... yes checking for getopt_long_only... yes checking whether getopt is POSIX compatible... yes checking for working GNU getopt function... yes checking whether getenv is declared... yes checking whether getpass is declared... yes checking for __fsetlocking... yes checking for tcgetattr... yes checking for tcsetattr... yes checking for mbsinit... yes checking for mbrtowc... yes checking for mprotect... yes checking for iswcntrl... yes checking whether fflush_unlocked is declared... yes checking whether flockfile is declared... yes checking whether fputs_unlocked is declared... yes checking whether funlockfile is declared... yes checking whether putc_unlocked is declared... yes checking for nl_langinfo and CODESET... yes checking whether getc_unlocked is declared... yes checking whether we are using the GNU C Library 2.1 or newer... yes checking for mbstate_t... yes checking for a traditional japanese locale... ja_JP checking for a transitional chinese locale... zh_CN.GB18030 checking for a french Unicode locale... fr_FR.UTF-8 checking for mmap... yes checking for MAP_ANONYMOUS... yes checking for memchr... yes checking whether memchr works... yes checking whether malloc, realloc, calloc are POSIX compliant... yes checking for wchar_t... yes checking for long long int... yes checking for unsigned long long int... yes checking for strcasestr... yes checking for working strerror function... yes checking for C/C++ restrict keyword... __restrict checking for wint_t... yes checking for alloca as a compiler built-in... yes checking for error_at_line... yes checking for fseeko... yes checking for getdelim... yes checking for getline... yes checking for working getline function... yes checking for getpagesize... yes checking whether __fsetlocking is declared... yes checking whether the compiler generally respects inline... yes checking whether lseek detects pipes... yes checking whether mbrtowc handles incomplete characters... yes checking whether mbrtowc works as well as mbtowc... yes checking whether mbrtowc handles a NULL string argument... yes checking whether mbrtowc has a correct return value... yes checking whether mbrtowc returns 0 when parsing a NUL character... yes checking whether mbrtowc handles incomplete characters... (cached) yes checking whether mbrtowc works as well as mbtowc... (cached) yes checking whether NULL can be used in arbitrary expressions... yes checking whether stdint.h conforms to C99... yes checking for random.h... no checking for struct random_data... yes checking for strcasecmp... yes checking for strncasecmp... yes checking whether strncasecmp is declared... yes checking whether strcasestr works in linear time... no checking for strcasestr... (cached) yes checking whether is standalone... yes checking whether iswcntrl works... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for getpagesize... (cached) yes checking for working mmap... yes checking for _LARGEFILE_SOURCE value needed for large files... (cached) no checking for strptime... yes checking for timegm... yes checking for snprintf... yes checking for vsnprintf... yes checking for vasprintf... yes checking for drand48... yes checking for strtoll... yes checking for usleep... yes checking for ftello... yes checking for sigblock... yes checking for sigsetjmp... no checking for memrchr... yes checking for wcwidth... yes checking for mbtowc... yes checking for struct utimbuf... yes checking for socklen_t... socklen_t checking for working fnmatch.h... yes checking for nanosleep... yes checking for clock_gettime... no checking for clock_gettime in -lrt... yes checking for gethostbyname... yes checking for inet_ntoa... yes checking for socket in -lsocket... no checking for dlopen in -ldl... yes checking for libssl... yes checking how to link with libssl... -lssl -lcrypto configure: compiling in support for SSL via OpenSSL checking for md5_calc in -lmd5... no configure: using the OpenSSL MD5 implementation checking for getaddrinfo... yes checking for INET6 protocol support... yes checking for struct sockaddr_in6... yes checking for struct sockaddr_storage... yes checking for struct sockaddr_in6.sin6_scope_id... yes configure: Enabling support for IPv6. checking for makeinfo... ${SHELL} /root/Desktop/wget-1.12/build-aux/missing --run makeinfo checking for perl5... no checking for perl... /usr/bin/perl checking for pod2man... /usr/bin/pod2man checking for iconv... yes checking for working iconv... yes checking for iconv declaration... extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking idna.h usability... yes checking idna.h presence... yes checking for idna.h... yes checking for stringprep_check_version in -lidn... yes configure: Enabling support for IRI. configure: creating ./config.status config.status: creating Makefile config.status: creating src/Makefile config.status: creating doc/Makefile config.status: creating util/Makefile config.status: creating po/Makefile.in config.status: creating tests/Makefile config.status: creating tests/WgetTest.pm config.status: creating lib/Makefile config.status: creating md5/Makefile config.status: creating windows/Makefile config.status: creating src/config.h config.status: executing depfiles commands config.status: executing po-directories commands config.status: creating po/POTFILES config.status: creating po/Makefile [root@localhost wget-1.12]# make uninstall Making uninstall in lib make[1]: Entering directory `/root/Desktop/wget-1.12/lib' make[2]: Entering directory `/root/Desktop/wget-1.12/lib' rm -f t-charset.alias charset.alias && \ /bin/sh ./config.charset 'i686-pc-linux-gnu' > t-charset.alias && \ mv t-charset.alias charset.alias rm -f t-ref-add.sed ref-add.sed && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/wget/g' ref-add.sin > t-ref-add.sed && \ mv t-ref-add.sed ref-add.sed rm -f t-ref-del.sed ref-del.sed && \ sed -e '/^#/d' -e 's/@''PACKAGE''@/wget/g' ref-del.sin > t-ref-del.sed && \ mv t-ref-del.sed ref-del.sed if test -f /usr/local/lib/charset.alias; then \ sed -f ref-del.sed /usr/local/lib/charset.alias > /usr/local/lib/charset.tmp; \ if grep '^# Packages using this file: $' /usr/local/lib/charset.tmp \ > /dev/null; then \ rm -f /usr/local/lib/charset.alias; \ else \ /usr/bin/install -c -m 644 /usr/local/lib/charset.tmp /usr/local/lib/charset.alias; \ fi; \ rm -f /usr/local/lib/charset.tmp; \ fi make[2]: Leaving directory `/root/Desktop/wget-1.12/lib' make[1]: Leaving directory `/root/Desktop/wget-1.12/lib' Making uninstall in md5 make[1]: Entering directory `/root/Desktop/wget-1.12/md5' make[2]: Entering directory `/root/Desktop/wget-1.12/md5' make[2]: Nothing to be done for `uninstall-am'. make[2]: Leaving directory `/root/Desktop/wget-1.12/md5' make[1]: Leaving directory `/root/Desktop/wget-1.12/md5' Making uninstall in src make[1]: Entering directory `/root/Desktop/wget-1.12/src' rm -f '/usr/local/bin/wget' make[1]: Leaving directory `/root/Desktop/wget-1.12/src' Making uninstall in doc make[1]: Entering directory `/root/Desktop/wget-1.12/doc' rm -f '/usr/local/share/doc/wget/wget.dvi' rm -rf '/usr/local/share/doc/wget/wget.html' install-info --info-dir='/usr/local/share/info' --remove '/usr/local/share/info/wget.info' cd '/usr/local/share/info' && rm -f wget.info wget.info-[0-9] wget.info-[0-9][0-9] wget.i[0-9] wget.i[0-9][0-9] rm -f /usr/local/share/man/man1/wget.1 rm -f '/usr/local/share/doc/wget/wget.pdf' rm -f '/usr/local/share/doc/wget/wget.ps' make[1]: Leaving directory `/root/Desktop/wget-1.12/doc' Making uninstall in po make[1]: Entering directory `/root/Desktop/wget-1.12/po' catalogs='en@quot.gmo en@boldquot.gmo en_US.gmo be.gmo bg.gmo ca.gmo cs.gmo da.gmo de.gmo el.gmo en_GB.gmo eo.gmo es.gmo et.gmo eu.gmo fi.gmo fr.gmo ga.gmo gl.gmo he.gmo hr.gmo hu.gmo id.gmo it.gmo ja.gmo lt.gmo nb.gmo nl.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sl.gmo sr.gmo sv.gmo tr.gmo uk.gmo vi.gmo zh_CN.gmo zh_TW.gmo'; \ for cat in $catalogs; do \ cat=`basename $cat`; \ lang=`echo $cat | sed -e 's/\.gmo$//'`; \ for lc in LC_MESSAGES ; do \ rm -f /usr/local/share/locale/$lang/$lc/wget.mo; \ done; \ done if test "wget" = "gettext-tools"; then \ for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot Makevars.template; do \ rm -f /usr/local/share/gettext/po/$file; \ done; \ else \ : ; \ fi make[1]: Leaving directory `/root/Desktop/wget-1.12/po' Making uninstall in tests make[1]: Entering directory `/root/Desktop/wget-1.12/tests' make[1]: Nothing to be done for `uninstall'. make[1]: Leaving directory `/root/Desktop/wget-1.12/tests' Making uninstall in util make[1]: Entering directory `/root/Desktop/wget-1.12/util' make[1]: Nothing to be done for `uninstall'. make[1]: Leaving directory `/root/Desktop/wget-1.12/util' Making uninstall in windows make[1]: Entering directory `/root/Desktop/wget-1.12/windows' make[1]: Nothing to be done for `uninstall'. make[1]: Leaving directory `/root/Desktop/wget-1.12/windows' make[1]: Entering directory `/root/Desktop/wget-1.12' make[1]: Nothing to be done for `uninstall-am'. make[1]: Leaving directory `/root/Desktop/wget-1.12' 0(^_^)0卸载成功!

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值