How to install rar compression tool in centos

Source: Internet
Author: User
Tags mkdir rar centos

Today, I want to decompress a rar file package on the server and run the unrar command to report that the file has not been installed. Well, I have to install it myself.

System: centos 5.x

Required software packages: rarlinux-5.2.1.tar.gz

1. Download the software package

Wget http://www.rarlab.com/rar/rarlinux-x64-5.2.1.tar.gz

2. Install rar

Tar zxf rarlinux-x64-5.2.1.tar.gz -- directory =/usr/local & cd/usr/local/rar
Make
Make install


If your centos is 32-bit, run the following command:

Wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz
Tar-zxvf rarlinux-3.9.3.tar.gz
Cd rar
Make

The following information indicates that the installation is successful:

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

 

Common rar commands:
Rar x centos.rar // Extract centos.rar to the current directory
Rar centos.rar./piaoyi.org // package the piaoyi.org directory as centos.rar

However, it is recommended that you use zip compression and decompression, because zip is generally provided in linux:
1. zip
Zip-r myfile.zip./web

Compress all files and folders under the current web directory into a myfile.zip file.-r indicates recursive compression of all files under the subdirectory.
2. unzip
Unzip-o-d/home/sunny myfile.zip

Decompress the myfile.zip file to/home/sunny/
-O: overwrite the file without prompting;
-D:-d/home/sunny indicates to extract the file to the/home/sunny directory;


After the installation is complete, a series of errors will be reported when rar or unrar is executed:

Rar:/lib64/libc. so.6: version 'glibc _ 100' not found (required by rar)
Or

Unrar:/lib64/libc. so.6: version 'glibc _ 000000' not found (required by unrar)

Solution:

Yes | cp rar_static/usr/local/bin/rar & yes | cp rar_static/usr/local/bin/unrar

After the script is executed, you can uncompress and decompress it.


Common error cause analysis:

1. If the following problem occurs when running the command rar:
Rar:/lib/i686/nosegneg/libc. so.6: version 'glibc _ 000000' not found (required by rar)

Solution:
Cp rar_static/usr/local/bin/rar

2. An error occurs when rar is used.

Bash:/usr/local/bin/rar:/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Because the 32-bit program is installed in the 64-bit system, the solution is as follows:
Yum install glibc. i686

3. After you reinstall glibc. i686, the following similar errors will occur:

Error while loading shared libraries: libstdc ++. so.6: cannot open shared object file: No such file or directory

Continue with the installation package:

Yum install libstdc ++. so.6

 
Supplement foreign sources:

Install Rar/Unrar centos 6
For 64 bit
Install unrar centos x64
# Wget http://pkgs.repoforge.org/unrar/unrar-4.0.7-1.el6.rf.x86_64.rpm
# Rpm-Uvh unrar-4.0.7-1.el6.rf.x86_64.rpm
Install rar centos x64
# Wget http://pkgs.repoforge.org/rar/rar-3.8.0-1.el6.rf.x86_64.rpm
# Rpm-Uvh rar-3.8.0-1.el6.rf.x86_64.rpm

 
For 32 bit
Install unrar centos 32
# Wget http://pkgs.repoforge.org/unrar/unrar-4.0.7-1.el6.rf.i686.rpm
# Rpm-Uvh unrar-4.0.7-1.el6.rf.i686.rpm

Install rar centos 32
# Wget http://pkgs.repoforge.org/rar/rar-3.8.0-1.el6.rf.i686.rpm
# Rpm-Uvh rar-3.8.0-1.el6.rf.i686.rpm

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.