首页

关于centos的linux系统下执行压缩zip或解压unzip命令"-bash: zip/unzip: command not found"错误异常

标签:压缩解压,zip安装,unzip安装     发布时间:2018-11-30   

一、错误说明

关于centos的linux系统下执行压缩zip或unzip解压命令报"-bash: unzip: command not found"错误异常,详情日志如下>>

[root@iZuf6gyurl0fqb87hirq23Z bin]# unzip  solr-md-v1.zip @b@-bash: unzip: command not found @b@[root@iZuf6gyurl0fqb87hirq23Z bin]# zip@b@-bash: zip: command not found

二、解决方法

1.  执行命令"yum install -y unzip zip"进行unzip、zip命令的安装

[root@iZuf6gyurl0fqb87hirq23Z bin]# yum install -y unzip zip@b@Loaded plugins: fastestmirror@b@Setting up Install Process@b@Loading mirror speeds from cached hostfile@b@base                                                                                                                           | 3.7 kB     00:00     @b@epel                                                                                                                           | 3.2 kB     00:00     @b@epel/primary                                                                                                                   | 3.2 MB     00:00     @b@epel                                                                                                                                                                                                                                                12501/12501@b@extras                                                                                                                                                                                                                                   | 3.4 kB     00:00     @b@updates                                                                                                                                                                                                                                  | 3.4 kB     00:00     @b@Resolving Dependencies@b@--> Running transaction check@b@---> Package unzip.x86_64 0:6.0-5.el6 will be installed@b@---> Package zip.x86_64 0:3.0-1.el6_7.1 will be installed@b@--> Finished Dependency Resolution@b@@b@Dependencies Resolved@b@@b@================================================================================================================================================================================================================================================================@b@ Package                                                     Arch                                                         Version                                                              Repository                                                  Size@b@================================================================================================================================================================================================================================================================@b@Installing:@b@ unzip                                                       x86_64                                                       6.0-5.el6                                                            base                                                       152 k@b@ zip                                                         x86_64                                                       3.0-1.el6_7.1                                                        base                                                       259 k@b@@b@Transaction Summary@b@================================================================================================================================================================================================================================================================@b@Install       2 Package(s)@b@@b@Total download size: 411 k@b@Installed size: 1.1 M@b@Downloading Packages:@b@(1/2): unzip-6.0-5.el6.x86_64.rpm                                                                                                                                                                                                        | 152 kB     00:00     @b@(2/2): zip-3.0-1.el6_7.1.x86_64.rpm                                                                                                                                                                                                      | 259 kB     00:00     @b@----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------@b@Total                                                                                                                                                                                                                            18 MB/s | 411 kB     00:00     @b@Running rpm_check_debug@b@Running Transaction Test@b@Transaction Test Succeeded@b@Running Transaction@b@Warning: RPMDB altered outside of yum.@b@  Installing : zip-3.0-1.el6_7.1.x86_64                                                                                                                                                                                                                     1/2 @b@  Installing : unzip-6.0-5.el6.x86_64                                                                                                                                                                                                                       2/2 @b@  Verifying  : unzip-6.0-5.el6.x86_64                                                                                                                                                                                                                       1/2 @b@  Verifying  : zip-3.0-1.el6_7.1.x86_64                                                                                                                                                                                                                     2/2 @b@@b@Installed:@b@  unzip.x86_64 0:6.0-5.el6                                                                                                      zip.x86_64 0:3.0-1.el6_7.1                                                                                                     @b@@b@Complete!

2.  再执行解压,可以顺利进行

[root@iZuf6gyurl0fqb87hirq23Z bin]# unzip  solr-md-v1.zip @b@Archive:  solr-md-v1.zip@b@   creating: solr-md-v1/@b@   creating: solr-md-v1/bak-conf/@b@  inflating: solr-md-v1/bak-conf/solr.xml  @b@   creating: solr-md-v1/bak-conf/subject/@b@   creating: solr-md-v1/bak-conf/subject/conf/@b@  inflating: solr-md-v1/bak-conf/subject/conf/dataimport.properties  @b@  inflating: solr-md-v1/bak-conf/subject/conf/mysql-dsmconfig.xml  @b@  inflating: solr-md-v1/bak-conf/subject/conf/schema.xml  @b@  inflating: solr-md-v1/bak-conf/subject/conf/solrc@b@  ...
<<热门下载>>