0

Building a Docker image. Trying to build samtools. What I installed:

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

So I have YUM and dnf, but not apt-get. I get this error when I try to build 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

I found this, but it requires apt-get.

What I tried, and how it failed:

[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
  • 2
    xz-devel (on RPM-based Linux distributions or Cygwin) should be the package you need (even if I didn't find it on rpmfind.
    – admstg
    Nov 9, 2023 at 18:02

1 Answer 1

3

The RockyLinux 8 package that provides liblzma development files would be xz-devel from the BaseOS repository.

The BaseOS repository should be enabled by default and you should be able to install from any RockyLinux 8 machine with: dnf install xz-devel

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .