首页 > 系统相关 >centos 更新curl版本

centos 更新curl版本

时间:2024-07-24 18:07:55浏览次数:14  
标签:centos sudo version 版本 curl latest cURL 7.80

How to Build and Install Latest cURL Version on CentOS

# Written by The Suhu (2021).

# Tested on CentOS 7 and CentOS 8

Previously I've written about How to Build and Install Latest cURL Version on Ubuntu. In this article in this article explain how to build and install latest cURL version on CentOS.

The default cURL installed on the operating system may not be the latest version. if you want the latest version, then you need to build from the source. Let’s check the cURL version installed with the following command.

[thesuhu@centos-8-1 ~]$ curl --version
curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.1g zlib/1.2.11 brotli/1.0.6 libidn2/2.2.0 libpsl/0
.20.2 (+libidn2/2.2.0) libssh/0.9.4/openssl/zlib nghttp2/1.33.0
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps 
telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz brotli TLS-SRP HTTP2 UnixSocke
ts HTTPS-proxy PSL 

Above shows the installed cURL version 7.61.0. While currently the latest version of cURL is 7.80.0. Go to https://curl.se/download/ to check the latest cURL version.

Download cURL latest version

Before we download the latest version of cURL, let’s update the system. It’s optional but I prefer to do this to keep the installed packages up to date.

sudo yum update -y

Install required packages.

sudo yum install wget gcc openssl-devel make -y

Download the latest cURL source. In this tutorial we will download 7.80.0 version.

wget https://curl.haxx.se/download/curl-7.80.0.tar.gz

Then extract the downloaded.

tar -xzvf curl-7.80.0.tar.gz

Building cURL

Go to the extracted directory of downloaded cURL source file.

cd curl-7.80.0

Now it’s time to build with configure command.

./configure --prefix=/usr/local --with-ssl

Make sure there are no errors from the above command execution. If there are no errors, finally we can install it with the make command.

make
sudo make install
sudo ldconfig

New version check

To make sure the new version is installed successfully, open a new session from terminal/ssh and run the command:

[thesuhu@centos-8-1 ~]$ curl --version
curl 7.80.0 (x86_64-pc-linux-gnu) libcurl/7.80.0 OpenSSL/1.1.1k-fips zlib/1.2.11
Release-Date: 2021-11-10
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet 
tftp 
Features: alt-svc AsynchDNS HSTS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

The cURL version should be 7.80.0.

The fast way

If you don't want to bother running commands one by one, you can create the script file below and run it.

#! /bin/bash

# Tested on CentOS 7 and CentOS 8
# Check the latest version at https://curl.se/download/
VERSION=7.80.0

cd ~
sudo yum update -y
sudo yum install wget gcc openssl-devel make -y
wget https://curl.haxx.se/download/curl-${VERSION}.tar.gz
tar -xzvf curl-${VERSION}.tar.gz 
rm -f curl-${VERSION}.tar.gz
cd curl-${VERSION}
./configure --prefix=/usr/local --with-ssl
make
sudo make install
sudo ldconfig
cd ~
rm -rf curl-${VERSION}

That's all and if you find it useful please star (⭐) & share.

标签:centos,sudo,version,版本,curl,latest,cURL,7.80
From: https://www.cnblogs.com/showker/p/18321418

相关文章

  • Centos7下安装配置最新版本Jenkins(2.452.3)
    1、基础环境配置1.1服务器下载Jenkins安装包下载地址:https://www.jenkins.io/download/下载命令:wgethttps://get.jenkins.io/war-stable/2.452.3/jenkins.war1.2服务器安装配置JDKJenkins是基于Java语言开发的,因此需要Java运行环境支持。安装JDK前一定要看下当前要......
  • CentOS7使用Postfix, Dovecot搭建邮箱服务
    CentOS7使用Postfix,Dovecot搭建邮箱服务的步骤与挑战?为了满足企业内部或个人的邮件服务需求,使用CentOS7搭建一个稳定、安全的邮箱服务器是一个非常实用的解决方案。AokSend将详细介绍如何在CentOS7系统上使用Postfix和Dovecot搭建邮箱服务。CentOS7:配置PostfixPostfix的配......
  • 如何使用 C# 检查用户是否安装了最低 Python 版本并且可以访问我的代码?
    我正在开发一个C#程序,该程序必须为一项特定任务运行一些Python代码。(Python代码很复杂,是由另一个团队开发的。无法在C#中重现其功能。)我正在尝试更新我的程序的安装程序文件以解决此问题:我希望它检查用户是否(谁正在安装我的程序)已安装Python并且它满足我的最低版......
  • Windows版本免费PyMol的安装
    技术背景在前面一篇博客中,我们介绍过在Linux平台下安装和使用免费版本的PyMol。其实同样的这个免费版在Windows平台上(这里以win11为例)也是支持的。安装流程这个免费版本的PyMol依赖于Conda,因此首先需要访问conda官网下载一个miniconda到本地进行安装,这部分配置都是通过交互界面......
  • nacos实现对minio的动态版本切换
    问题:怎样在项目部署后,在不涉及对源码的改动情况下,以及如部分场景下业务的更替进行版本切换呢?这里我们选择通过nacos进行相关操作,下面将以nacos控制minio修改服务提供商这一示例进行演示首先,什么是nacos?Nacos是阿里巴巴开源的一个易于构建云原生应用的动态服务发现、配置管理和......
  • 创建SpringBoot项目时出现Cannot resolve plugin org.springframework的解决方法 原
    创建SpringBoot项目时出现Cannotresolvepluginorg.springframework的解决方法原因是添加依赖时未添加版本号原因是添加依赖时未添加版本号解决方法:在pom.xml文件中的依赖添加版本号原来:<plugin><groupId>org.springframework.boot</groupId><a......
  • centos7 安装指定版本的chrome + chromedriver
    谷歌浏览器历史版本相关地址:https://www.chromedownloads.net/chrome64win/ 驱动下载地址:https://registry.npmmirror.com/binary.html?path=chromedriver   上传下载好的chrome和chromediriver到centos服务器中解压后上传  安装chromeyumlocalinstall-y......
  • SpringBoot升级到3.3.2版本,JDK升级到17,引入Mybatis-plus后启动报错:Property 'sqlSessi
    【问题描述】2024-07-23T15:16:07.174+08:00WARN2604---[questionnaire][main]ConfigServletWebServerApplicationContext:Exceptionencounteredduringcontextinitialization-cancellingrefreshattempt:org.springframework.beans.factory.UnsatisfiedDependen......
  • Windows NodeJS 版本管理工具 Fnm 快速使用
    WindowsNode.JS版本管理工具Fnm快速使用简介:FastandsimpleNode.jsversionmanager,builtinRust(快速而简单的Node.js版本管理器,用Rust构建)目录Windows下载与安装Windows使用-修改默认安装根目录Windows使用-配置CMD或PowerShellWindows使用-安装Node......
  • Apache DolphinScheduler 3.2.2 版本正式发布!
    ApacheDolphinScheduler3.2.2版本正式发布!近日,ApacheDolphinScheduler发布了3.2.2版本。此版本主要基于3.2.1版本进行了bug修复,新增若干特性,并进行了众多改进和Bug修复,以及文档修复等。......