2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Curlのアップグレード

Last updated at Posted at 2018-03-26

概要

いつもどうやるのか忘れてしまうので、単純にメモ代わりです。
src.rpmを使ってちょちょいと入れてしまおうと思います。
ちなみに環境はCentOS6

作業手順

作業前に必要なものを予めインストールしておきます。

# yum install openssl-devel libmetalink-devel libssh2-devel c-ares-devel stunnel perl-Time-HiRes

次のURLから最新のrhel6.src.rpmを探します。
http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/

どうも現時点(2016年12月2日)ではcurl-7.51.0-3.0.cf.rhel6.src.rpmが最新のようです。

$ cd /usr/local/src/
$ mkdir curl
$ cd curl
$ wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/curl-7.51.0-3.0.cf.rhel6.src.rpm

リビルドします。

$ rpmbuild --rebuild curl-7.51.0-3.0.cf.rhel6.src.rpm
error: Failed build dependencies:
        libnghttp2-devel is needed by curl-7.51.0-3.0.cf.rhel6.x86_64
        nghttp2 is needed by curl-7.51.0-3.0.cf.rhel6.x86_64
        multilib-rpm-config is needed by curl-7.51.0-3.0.cf.rhel6.x86_64

あら、まだ足りないみたいですね。
不足しているものをインストールします。

# yum install libnghttp2-devel nghttp2 multilib-rpm-config

再度リビルド

# rpmbuild --rebuild curl-7.51.0-3.0.cf.rhel6.src.rpm

環境によると思いますが十数分くらい時間がかかりました。
その後、インストール

# cd
# rpm -Uvh rpmbuild/RPMS/x86_64/curl-7.51.0-3.0.cf.rhel6.x86_64.rpm rpmbuild/RPMS/x86_64/libcurl-7.51.0-3.0.cf.rhel6.x86_64.rpm rpmbuild/RPMS/x86_64/libcurl-devel-7.51.0-3.0.cf.rhel6.x86_64.rpm

できあがり。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?