Home  >  Article  >  Operation and Maintenance  >  How to solve the problem that unzip cannot be used in Linux

How to solve the problem that unzip cannot be used in Linux

WBOY
WBOYOriginal
2022-07-29 16:53:225803browse

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.

How to solve the problem that unzip cannot be used in Linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

What to do if unzip cannot be used in Linux

If you cannot use the unzip command to decompress the .zip file,

How to solve the problem that unzip cannot be used in Linux

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:

How to solve the problem that unzip cannot be used in Linux

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

How to solve the problem that unzip cannot be used in Linux

How to solve the problem that unzip cannot be used in Linux

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;

How to solve the problem that unzip cannot be used in Linux

Expand knowledge

unzip command can View and decompress the zip file. The basic format of this command is as follows:

[root@localhost ~]# unzip [选项] 压缩包名

How to solve the problem that unzip cannot be used in Linux

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn