Home > Article > Operation and Maintenance > How to solve the problem that unzip cannot be used in Linux
Linux method to solve the problem that unzip cannot be used: 1. Use the "yum list | grep unzip" command to obtain the software installation list. If there is no result, it means that the specified software is not installed; 2. Use the "yum install unzip" command to install unzip, just enter "y" during the installation process.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
If you cannot use the unzip command to decompress the .zip file,
Maybe you don’t have it Install unzip software, the following is the installation method
Installation method:
1.#Get the installation list installation command: yum list | grep zip/unzip
If the following problems exist:
You need to change the yum data source
# 进入文件 cd /etc/yum.repos.d/ # 备份 mv CentOS-Base.repo CentOS-Base.repo.bk # 更换新的数据源(wget不存在可参考博客:https://blog.csdn.net/qq_34497272/article/details/119418912) wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # 清除缓存 yum clean all yum makecache
2, #Install compression command: yum install zip #When prompted for input, please enter y;
#Install decompression command: yum install unzip #When prompted for input, please Enter y;
Expand knowledge
unzip command can View and decompress the zip file. The basic format of this command is as follows:
[root@localhost ~]# unzip [选项] 压缩包名
The example is as follows:
Whether it is a file compressed package or a directory compressed package, You can decompress it directly, for example:
[root@localhost ~]# unzip dir1.zip Archive: dir1.zip creating: dirl/ #解压缩
Recommended learning: Linux video tutorial
The above is the detailed content of How to solve the problem that unzip cannot be used in Linux. For more information, please follow other related articles on the PHP Chinese website!