构建 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