Docker イメージをビルドします。 samtoolsを作ってみてください。私がインストールしたもの:
FROM rockylinux:8
RUN dnf -y update && dnf -y upgrade && dnf -y --allowerasing install wget libcurl curl git vim cmake gcc gcc-c++ zip unzip zlib zlib-devel tbb tbb-devel tar bzip2 bzip2-devel ncurses-devel
だからYUMとdnfはありますが、apt-getはありません。 samtoolsをビルドしようとすると、このエラーが発生します。
configure: error: liblzma development files not found
The CRAM format may use LZMA2 compression, which is implemented in HTSlib
by using compression routines from liblzma <http://tukaani.org/xz/>.
Building HTSlib requires liblzma development files to be installed on the
build machine; you may need to ensure a package such as liblzma-dev (on Debian
or Ubuntu Linux), xz-devel (on RPM-based Linux distributions or Cygwin), or
xz (via Homebrew on macOS) is installed; or build XZ Utils from source.
Either configure with --disable-lzma (which will make some CRAM files
produced elsewhere unreadable) or resolve this error to build HTSlib.
configure: error: ./configure failed for htslib-1.13
私が見つけたこれしかし、apt-getが必要です。
私が試したことと失敗した方法:
[root@29b6e2a8aef2 samtools-1.13]# dnf -y install liblzma-devel
Last metadata expiration check: 0:48:17 ago on Wed Oct 4 00:25:57 2023.
No match for argument: liblzma-devel
Error: Unable to find a match: liblzma-devel
[root@29b6e2a8aef2 samtools-1.13]# dnf -y install liblzma*
Last metadata expiration check: 0:48:23 ago on Wed Oct 4 00:25:57 2023.
Package xz-libs-5.2.4-4.el8_6.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@29b6e2a8aef2 samtools-1.13]# dnf -y install xz-libs seems
Last metadata expiration check: 0:50:48 ago on Wed Oct 4 00:25:57 2023.
Package xz-libs-5.2.4-4.el8_6.aarch64 is already installed.
No match for argument: seems
Error: Unable to find a match: seems
[root@29b6e2a8aef2 samtools-1.13]# dnf -y install xz-libs
Last metadata expiration check: 0:50:54 ago on Wed Oct 4 00:25:57 2023.
Package xz-libs-5.2.4-4.el8_6.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@29b6e2a8aef2 samtools-1.13]# dnf -y install xz-libs*
Last metadata expiration check: 0:51:02 ago on Wed Oct 4 00:25:57 2023.
Package xz-libs-5.2.4-4.el8_6.aarch64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
答え1
liblzma 開発ファイルを提供する RockyLinux 8 パッケージは次のとおりです。BaseOSリポジトリのxz-devel。
BaseOSリポジトリはデフォルトで有効にする必要があり、次のコマンドを使用してすべてのRockyLinux 8システムにインストールできる必要があります。dnf install xz-devel