bash: tar-zxvf:
时间: 2023-09-09 20:11:56 浏览: 102
内含:jdk-8u131-linux-x64.tar.gz , linux 配置JDK的方法说明
5星 · 资源好评率100%
-bash: tar: command not found是由于系统中没有安装tar命令导致的错误。根据引用的内容,你可以按照以下步骤来解决这个问题:
1. 下载并解压bash的tar文件:
```
#tar zxvf bash-4.4.tar.gz
```
2. 进入解压后的目录:
```
#cd bash-4.4
```
3. 运行configure命令进行配置(如果是在centos7上编译,需要先安装gcc):
```
#./configure
```
4. 编译:
```
#make
```
5. 安装:
```
#make install
```
6. 添加环境变量,将bash的安装路径加入到PATH中:
```
#echo 'export PATH=/usr/local/bin:$PATH' >> /etc/profile
```
7. 更新环境变量:
```
#source /etc/profile
```
这样就可以解决bash: tar-zxvf: -bash: tar: command not found的问题了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [最近在往阿里服务器上传tar文件遇到-bash: rz: command not found的问题](https://blog.csdn.net/qq_37233895/article/details/82856905)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [修复bash漏洞的bash-4.4.tar.gz源码包](https://download.csdn.net/download/tillen/10145927)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [yum 安装,终端报错:-bash: yum: command not found](https://blog.csdn.net/weixin_44471490/article/details/108130151)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文