CentOS 7 curl version upgrade

1 minute read

I thought that if I followed the procedure introduced in some article, it would be completed smoothly, but I struggled unexpectedly, so I summarized my own procedure.

I hope it helps those who hit the same wall, saying, “I installed the latest version, but when I checked the version, it remained old.”

Install the required modules

Basically, I followed this article. I’m not sure what the required modules are. .. ..
https://sterfield.co.jp/programmer/curlの最新版をインストールする/

$ sudo yum install openssl-devel libmetalink-devel libssh2-devel c-ares-devel lbzip2

Copy the latest curl-X.X.X.tar.gz link address at https://curl.haxx.se/download.html.

Download the latest version of tar.gz in any directory

After the installation is complete, I want to delete unnecessary folders and files, so download them to my home directory in an easy-to-understand manner.

$ cd
$wget [copied link address]

Extract the downloaded curl-X.X.X.tar.gz

After unpacking, a directory called curl-X.X.X will be created, so move the working directory.

$ tar xfvz curl-X.X.X.tar.gz
$ cd curl-X.X.X

Install the latest version of curl

To be honest, I ran it without knowing the meaning of these commands, but when I put together this article, I looked it up again and found an article that was explained carefully.
https://qiita.com/chihiro/items/f270744d7e09c58a50a5/
https://www.itmedia.co.jp/help/tips/linux/l0302.html

$ ./configure --enable-libcurl-option
$ make
$ sudo make install

Not the latest version …

Finally, I checked the version curl -V, but for some reason it wasn’t the latest version, so I checked the full path of the command with which -a curl.

$ which -a curl
/usr/local/bin/curl
/usr/bin/curl

After checking each version, it seems that the latest version is installed in / usr / local / bin / curl.

$ /usr/local/bin/curl -V
New version information

$ /usr/bin/curl -V
Old version information

I tried to copy “I made a mistake in the installation path, so I deleted the old one and made it a link” in this article, and I found that curl -V was the latest version!
https://m-shige1979.hatenablog.com/entry/2018/10/08/080000

$ sudo rm /usr/bin/curl
$ sudo ln -s /usr/local/bin/curl /usr/bin/curl
$ curl -V
New version information