0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

libaio1がUbuntu24.04で使えない

Posted at

Linuxの非同期I/Oを司るライブラリ libaio1
Dockerfile内にてこんな感じで取り込んでいたのですが

apt-get install -y libaio1 && \

いざビルドしてみるとエラー。

ERROR: failed to build: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y libaio1 && <省略>" did not complete successfully: exit code: 100

環境はLinux(AMD64)、Ubuntu24.04。
Dockerfileでの指定はこんな感じです。

FROM --platform=linux/amd64 ubuntu:latest

exit code: 100 はどうもapt-getで失敗した際に出るエラーとのこと。

調べてみると、先人の知恵がありました。Ubuntu24.04ではlibaio1が使えないよ〜😢という話をしています。
自分が作業していたプロジェクトは更新頻度が低いので、このバージョンのUbuntuではビルドされたことがなく、いつの間にか動かないコードになってしまっていたのでしょう。

代わりに libtinfo5_6.4-2_amd64libncurses5_6.4-2_amd64libaio1_0.3.113-4_amd64libnss3-tools を入手すればいいぜ!と言っている人がいるので
先人の言う通りにライブラリを変更して、下記の通りで取得するようにすると無事ビルドが通りました◎

apt-get install -y curl dpkg && \
curl -O http://launchpadlibrarian.net/648013231/libtinfo5_6.4-2_amd64.deb && \
dpkg -i libtinfo5_6.4-2_amd64.deb && \
curl -O http://launchpadlibrarian.net/648013227/libncurses5_6.4-2_amd64.deb && \
dpkg -i libncurses5_6.4-2_amd64.deb && \
curl -O http://launchpadlibrarian.net/646633572/libaio1_0.3.113-4_amd64.deb && \
dpkg -i libaio1_0.3.113-4_amd64.deb && \
apt-get install -y libnss3-tools && \

アプリケーションの動作確認をしても問題なかったので、これを使う方針でよさそうです。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?