Help us understand the problem. What is going on with this article?

Ubuntu18.04でlibcurl3と4が共存できない問題

More than 1 year has passed since last update.
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

Ubuntu18.04に入るcurlはlibcurl4に依存していて、
もし任意で使っているパッケージがlibcurl3に依存している場合、共存ができずに困る。

そのため、libcurl4に依存しているcurlをインストールした状態で、
libcurl3に依存しているパッケージを利用しようとするとエラーになります。

$ apt-cache show curl | grep -i depends
Depends: libc6 (>= 2.17), libcurl4 (= 7.58.0-2ubuntu3.2), zlib1g (>= 1:1.1.4)

解決策

$ sudo apt-get install libcurl3 #curlが削除される
#libcurl.so.4.5.0をlibcurl3.so.4.5.0としてコピーしておく
$ sudo cp /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0 /usr/lib/x86_64-linux-gnu/libcurl3.so.4.5.0
$ sudo apt-get install curl #libcurl3が消え、libcurl4が入る

これで問題なくcurlも使えて、libcurl3に依存しているパッケージも動くはず。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away