CentOS 6.10 解压 rar压缩包

下载rarlinux和其运行需要的glibc-2.14
[root@localhost ~]# wget https://www.rarlab.com/rar/rarlinux-x64-5.9.0.tar.gz
[root@localhost ~]# wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
安装glibc-2.14
[root@localhost ~]# tar zxvf glibc-2.14.tar.gz
[root@localhost ~]# cd glibc-2.14/
[root@localhost glibc-2.14]# mkdir build && cd build
[root@localhost build]# …/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

如果报错configure: error: no acceptable C compiler found in $PATH
,需要yum install gcc
[root@localhost build]# make -j 8
经过很长时间的输出

make[4]: Nothing to be done for rtld-all'. make[4]: Leaving directory/root/glibc-2.14/string’
make[4]: Entering directory /root/glibc-2.14/nptl' make[4]: Nothing to be done forrtld-all’.
make[4]: Leaving directory /root/glibc-2.14/nptl' make[3]: Leaving directory/root/glibc-2.14/elf’
gcc -B/usr/bin/ -nostdlib -nostartfiles -o /root/glibc-2.14/build/elf/sprof -Wl,-dynamic-linker=/lib64/ld-linux-x86-64.s
o.2 -Wl,-z,combreloc -Wl,-z,relro -Wl,–hash-style=both /root/glibc-2.14/build/csu/crt1.o /root/glibc-2.14/build/csu/crti.o gcc -B/usr/bin/ --print-file-name=crtbegin.o /root/glibc-2.14/build/elf/sprof.o /root/glibc-2.14/build/dlfcn/libdl.so.2 -Wl,-rpath-link=/root/glibc-2.14/build:/root/glibc-2.14/build/math:/root/glibc-2.14/build/elf:/root/glibc-2.14/build/dlfcn:/root/glibc-2.14/build/nss:/root/glibc-2.14/build/nis:/root/glibc-2.14/build/rt:/root/glibc-2.14/build/resolv:/root/glibc-2.14/build/crypt:/root/glibc-2.14/build/nptl /root/glibc-2.14/build/libc.so.6 /root/glibc-2.14/build/libc_nonshared.a -Wl,–as-needed /root/glibc-2.14/build/elf/ld.so -Wl,–no-as-needed -lgcc -Wl,–as-needed -lgcc_s -Wl,–no-as-needed gcc -B/usr/bin/ --print-file-name=crtend.o /root/glibc-2.14/build/csu/crtn.omake[2]: Leaving directory /root/glibc-2.14/elf' make[1]: Leaving directory/root/glibc-2.14’
[root@localhost build]# echo $?
0
[root@localhost build]# make install
最后输出
CC=“gcc -B/usr/bin/” /usr/bin/perl scripts/test-installation.pl /root/glibc-2.14/build/
/usr/bin/ld: cannot find -lnss_test1
collect2: ld returned 1 exit status
Execution of gcc -B/usr/bin/ failed!
The script has found some problems with your installation!
Please read the FAQ and the README file and check the following:

  • Did you change the gcc specs file (necessary after upgrading from
    Linux libc5)?
  • Are there any symbolic links of the form libXXX.so to old libraries?
    Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
    libm.so should point to the newly installed glibc file - and there should be
    only one such link (check e.g. /lib and /usr/lib)
    You should restart this script from your build directory after you’ve
    fixed all problems!
    Btw. the script doesn’t work if you’re installing GNU libc not as your
    primary library!
    make[1]: *** [install] Error 1
    make[1]: Leaving directory `/root/glibc-2.14’
    make: *** [install] 错误 2
    执行
    [root@localhost build]# strings /lib64/libc.so.6 | grep GLIBC
    GLIBC_2.2.5
    GLIBC_2.2.6
    GLIBC_2.3
    GLIBC_2.3.2
    GLIBC_2.3.3
    GLIBC_2.3.4
    GLIBC_2.4
    GLIBC_2.5
    GLIBC_2.6
    GLIBC_2.7
    GLIBC_2.8
    GLIBC_2.9
    GLIBC_2.10
    GLIBC_2.11
    GLIBC_2.12
    GLIBC_2.13
    GLIBC_2.14
    GLIBC_PRIVATE
    发现有glibc 2.14版本
    [root@localhost build]# cd
    [root@localhost ~]# tar zxvf rarlinux-x64-5.9.0.tar.gz
    rar/
    rar/unrar
    rar/acknow.txt
    rar/whatsnew.txt
    rar/order.htm
    rar/readme.txt
    rar/rar.txt
    rar/makefile
    rar/default.sfx
    rar/rar
    rar/rarfiles.lst
    rar/license.txt
    [root@localhost ~]# cd rar
    [root@localhost rar]# make
    mkdir -p /usr/local/bin
    mkdir -p /usr/local/lib
    cp rar unrar /usr/local/bin
    cp rarfiles.lst /etc
    cp default.sfx /usr/local/lib
    然后就可以使用unrar命令了

你可能感兴趣的:(服务器与存储)