当前位置: 首页 > news >正文

centos安装了curl却报 -bash: curl: command not found

前因

我服务器上想用curl下载docker-compress,发现没有curl命令,就去下载安装,安装完成之后,报-bash: curl: command not found

解决方法

[root@centos ~]# rpm -e --nodeps curl
warning: file /usr/bin/curl: remove failed: No such file or directory[root@centos ~]# yum remove curl
Loaded plugins: fastestmirror, langpacks
No Match for argument: curl
No Packages marked for removal[root@centos ~]# rpm -qa|grep curl
python-pycurl-7.19.0-19.el7.x86_64
libcurl-7.29.0-57.el7_8.1.x86_64[root@centos ~]# yum -y install curl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package curl.x86_64 0:7.29.0-57.el7_8.1 will be installed
--> Finished Dependency ResolutionDependencies Resolved
============================================================================================================================================Package                     Arch                          Version                                     Repository                      Size
============================================================================================================================================
Installing:curl                        x86_64                        7.29.0-57.el7_8.1                           updates                        271 kTransaction Summary
============================================================================================================================================
Install  1 PackageTotal download size: 271 k
Installed size: 528 k
Downloading packages:
curl-7.29.0-57.el7_8.1.x86_64.rpm                                                                                    | 271 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 5 pre-existing rpmdb problem(s), 'yum check' output follows:
abrt-addon-kerneloops-2.1.11-57.el7.centos.x86_64 has missing requires of curl
abrt-addon-xorg-2.1.11-57.el7.centos.x86_64 has missing requires of curl
2:postfix-2.10.1-9.el7.x86_64 has missing requires of libmysqlclient.so.18()(64bit)
2:postfix-2.10.1-9.el7.x86_64 has missing requires of libmysqlclient.so.18(libmysqlclient_18)(64bit)
rpm-4.11.3-43.el7.x86_64 has missing requires of curlInstalling : curl-7.29.0-57.el7_8.1.x86_64                                                                                            1/1 Verifying  : curl-7.29.0-57.el7_8.1.x86_64                                                                                            1/1 
Installed:curl.x86_64 0:7.29.0-57.el7_8.1                                                                                                           
Complete![root@centos ~]# curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.44 zlib/1.2.7 libidn/1.28 libssh2/1.8.0
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets 
[root@centos ~]#

在这里插入图片描述

其实我第一次按照csdn一篇博客试了一下,是失败的,第二次又找了篇博客园的文章试了下,就成功了,但两篇文章的内容是一模一样的,也很离谱。

http://www.lryc.cn/news/262607.html

相关文章:

  • Re58:读论文 REALM: Retrieval-Augmented Language Model Pre-Training
  • java的json解析
  • Spring事务失效的几种情况
  • filter的用法与使用场景:筛选数据
  • ClickHouse(18)ClickHouse集成ODBC表引擎详细解析
  • 网络攻击(一)--安全渗透简介
  • 视频号小店资金需要多少?
  • 机器学习项目精选 第一期:超完整数据科学资料合集
  • 档案数字化管理可以提供什么服务?
  • 第一周:AI产品经理跳槽准备工作
  • 基于核心素养高中物理“深度学习”策略及其教学研究课题论证设计方案
  • 通过 Java 17、Spring Boot 3.2 构建 Web API 应用程序
  • go原生http开发简易blog(一)项目简介与搭建
  • [足式机器人]Part4 南科大高等机器人控制课 Ch09 Dynamics of Open Chains
  • 概率论复习
  • ES客户端RestHighLevelClient的使用
  • GitHub入门命令介绍
  • EasyExcel 简单导入
  • Termux搭建nodejs环境
  • 喜报丨迪捷软件入选2023年浙江省信息技术应用创新典型案例
  • C语言连接zookeeper客户端(不能完全参考官网教程)
  • python排序
  • 【Spark精讲】Spark Shuffle详解
  • 【C++初阶】八、初识模板(泛型编程、函数模板、类模板)
  • 珠海数字孪生赋能工业智能制造,助力制造业企业数字化转型
  • HarmonyOS开发实战:如何实现一个运动排名榜页面
  • 2019年第八届数学建模国际赛小美赛D题安全选举的答案是什么解题全过程文档及程序
  • vivado 创建实施约束
  • 【代码分析】MPI
  • 数字孪生Web3D智慧机房可视化运维云平台建设方案