How to Install ARPACK on Linux

Deepak Prasad
Tested on Ubuntu 26.04 LTS
RHEL 10.2
Package libarpack2-dev 3.9.1-6build1
arpack-devel 3.9.1-5.el10_0
Applies to Ubuntu, Debian, RHEL, Rocky Linux, AlmaLinux, Fedora
Privilege sudo or root
Scope Install ARPACK runtime and development packages from distribution repositories, verify shared libraries and pkg-config metadata, and link a sample Fortran program. Does not cover building ARPACK-NG from source.
Related guides apt command
dnf command
install EPEL on Rocky Linux
dpkg command
rpm command

ARPACK solves large sparse eigenvalue problems. Most distributions today package the maintained ARPACK-NG implementation, even when the binary package is still named arpack or libarpack2. Package names and repository layout differ between Debian and RHEL families, but the install intent is the same: pull the runtime library, or the development package when you compile against ARPACK.


Quick reference: ARPACK packages by distribution

Distribution Runtime Development
Ubuntu / newer Debian libarpack2t64 libarpack2-dev
RHEL / Rocky / AlmaLinux arpack arpack-devel
Fedora arpack arpack-devel

Package names vary by release. Ubuntu 24.04 and newer use libarpack2t64, while older Ubuntu/Debian releases may still use libarpack2. Some Debian-family releases also provide libarpack64-2 and libarpack64-2-dev. These are ILP64 builds that use 64-bit integer interfaces; they are not ARM64-specific packages. Search your package manager before assuming the table row matches your release exactly.


What is ARPACK and ARPACK-NG?

ARPACK is a collection of Fortran routines for computing a few eigenvalues and eigenvectors of large sparse matrices. Upstream development of the original ARPACK stalled, so the community maintains ARPACK-NG as the active fork.

When you run apt install libarpack2-dev or dnf install arpack-devel, you get ARPACK-NG libraries and headers. The package names kept the older arpack wording for compatibility. On the systems tested here, both families shipped version 3.9.1.


Install ARPACK on Ubuntu and Debian

If you plan to compile software that calls ARPACK, install the development package. It pulls the runtime library automatically.

Refresh the package index first:

bash
sudo apt update

After the package lists refresh successfully, install the development package:

bash
sudo apt install libarpack2-dev

The install pulls libarpack2t64 as the runtime dependency. On Ubuntu 26.04 the versions looked like this:

output
ii  libarpack2-dev:amd64   3.9.1-6build1   amd64   Fortran77 subroutines ... (development)
ii  libarpack2t64:amd64    3.9.1-6build1   amd64   Fortran77 subroutines ...

When you only need programs that already link against ARPACK at runtime, install the runtime package alone:

bash
sudo apt install libarpack2t64

Do not target libarpack2 on current Ubuntu or Debian unless your release still publishes that package name. On Ubuntu 26.04, libarpack2 is not the current runtime package.

To see every ARPACK-related name your release offers:

bash
apt-cache search arpack

Sample output on Ubuntu 26.04:

output
libarpack2-dev - Fortran77 subroutines ... (development)
libarpack2t64 - Fortran77 subroutines to solve large scale eigenvalue problems
libparpack2-dev - Parallel subroutines ... (development)
libparpack2t64 - Parallel subroutines to solve large scale eigenvalue problems

The libarpack++2* packages are C++ bindings. This guide focuses on the standard Fortran library most scientific code expects.


Install ARPACK on RHEL, Rocky Linux, and AlmaLinux

On RHEL-family systems, ARPACK lives in EPEL, not in the base operating system repositories. Without EPEL enabled, dnf search arpack returns no matches and dnf install arpack-devel fails.

Enable EPEL

On Rocky Linux, AlmaLinux, and many rebuilds, install the EPEL release package from the default repositories:

bash
sudo dnf install epel-release

On RHEL 10, the epel-release package may not appear in your subscribed repositories. Install the official EPEL release RPM instead:

bash
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm

After EPEL is enabled, dnf repolist should list a repository named epel:

output
epel    Extra Packages for Enterprise Linux 10 - x86_64

See install EPEL on Rocky Linux if repository setup on your host differs.

Install the ARPACK packages

For compiling against ARPACK, install the development package:

bash
sudo dnf install arpack-devel

DNF resolves BLAS and LAPACK dependencies automatically on EL 10. A successful install on Rocky Linux 10 reported:

output
Installed:
  arpack-3.9.1-5.el10_0.x86_64
  arpack-devel-3.9.1-5.el10_0.x86_64
  flexiblas-3.4.2-3.el10.x86_64
  openblas-0.3.29-1.el10.x86_64

You do not need a separate FlexiBLAS workaround on RHEL 10 when EPEL is enabled. Older Rocky Linux 9 notes that required dnf --enablerepo=crb install flexiblas-devel before ARPACK do not apply as a universal EL 10 step.

When you only need runtime libraries for packaged applications:

bash
sudo dnf install arpack

Fedora

Fedora ships arpack and arpack-devel in the primary repositories. Package names match RHEL, but you usually do not need EPEL:

bash
sudo dnf install arpack-devel

Verify the ARPACK installation

Debian and Ubuntu

List installed ARPACK packages:

bash
dpkg -l | grep -i arpack

Confirm the shared libraries are registered:

bash
ldconfig -p | grep arpack

Sample output:

output
libarpack.so.2 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libarpack.so.2
	libarpack.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libarpack.so

The development package installs headers under /usr/include/arpack/ and a pkg-config file at /usr/lib/x86_64-linux-gnu/pkgconfig/arpack.pc. The pkg-config utility is a separate package on Debian and Ubuntu:

bash
sudo apt install pkg-config

Ask pkg-config for linker flags:

bash
pkg-config --libs arpack
output
-larpack

The same metadata reports version 3.9.1 with pkg-config --modversion arpack.

RHEL, Rocky Linux, and AlmaLinux

List installed RPMs:

bash
rpm -qa | grep -i arpack
output
arpack-3.9.1-5.el10_0.x86_64
arpack-devel-3.9.1-5.el10_0.x86_64

Check shared libraries:

bash
ldconfig -p | grep arpack
output
libarpack64.so.2 (libc6,x86-64) => /lib64/libarpack64.so.2
	libarpack.so.2 (libc6,x86-64) => /lib64/libarpack.so.2
	libarpack.so (libc6,x86-64) => /lib64/libarpack.so

On EL systems, arpack-devel also ships arpack.pc, arpack64.pc, parpack.pc, and parpack64.pc under /usr/lib64/pkgconfig/. Query linker flags the same way:

bash
pkg-config --libs arpack
output
-larpack

ARPACK runtime vs development packages

Runtime packages ship shared libraries programs load at run time. Development packages add what you need to compile and link new code.

Role Ubuntu / newer Debian RHEL family
Runtime libarpack2t64 arpack
Development libarpack2-dev arpack-devel

Development packages typically provide:

  • Shared library linker names such as libarpack.so
  • C and Fortran headers under /usr/include/arpack/
  • pkg-config .pc files and CMake config where the packager includes them

Installing only the runtime package is enough when you run software that already depends on ARPACK. Install the -dev or -devel package when you see linker errors such as cannot find -larpack or missing arpack.h.


A minimal linker test confirms that the development package installed a linkable libarpack library. Save a short Fortran source file:

bash
cat > /tmp/arpack_link.f <<'EOF'
program arpack_link_test
end program arpack_link_test
EOF

Install a Fortran compiler if you do not already have one. On Ubuntu:

bash
sudo apt install gfortran

On RHEL-family systems, install the Fortran compiler explicitly:

bash
sudo dnf install gcc-gfortran

Link against ARPACK. Use free-form source or start fixed-form labels in column 6; a one-line program test; end program file fails under gfortran's default fixed form:

bash
gfortran -ffree-form -larpack -o /tmp/arpack_link_test /tmp/arpack_link.f

A silent exit with no error means the linker found libarpack. You can also pass pkg-config output directly:

bash
gfortran -ffree-form $(pkg-config --cflags --libs arpack) -o /tmp/arpack_link_test /tmp/arpack_link.f

Install PARPACK for parallel ARPACK

PARPACK adds MPI-parallel eigenvalue routines. Skip this section unless your workload actually uses MPI.

On Ubuntu and Debian, install the parallel development package:

bash
sudo apt install libparpack2-dev

That pulls libparpack2t64 for runtime libraries.

On RHEL 10 with EPEL enabled, there is no separate parpack RPM in repository search results. Parallel ARPACK metadata ships inside arpack-devel as parpack.pc and parpack64.pc. Install arpack-devel when you need PARPACK headers on EL systems.


Arch Linux and other distributions

On Arch-based systems, the arpack package from the official repositories includes headers, pkg-config files, and both serial and parallel libraries in one install:

bash
sudo pacman -S arpack

Treat Arch as a short path only if you already use it. The Debian and RHEL workflows above cover the majority of server and HPC installs.


Troubleshooting

Symptom Likely cause Fix
Unable to locate package libarpack2 on Ubuntu Runtime package renamed for 64-bit time_t Install libarpack2t64 or libarpack2-dev
No match for argument: arpack-devel on RHEL EPEL not enabled Install epel-release or the EPEL 10 release RPM, then retry
cannot find -larpack when linking Development package missing Install libarpack2-dev or arpack-devel
pkg-config: command not found on Debian pkg-config package not installed sudo apt install pkg-config
Package arpack was not found in pkg-config Dev package missing or wrong PKG_CONFIG_PATH Install the -dev/-devel package; check /usr/lib64/pkgconfig on EL
BLAS/LAPACK errors at link time Private dependencies not passed to the linker Add -lblas -llapack or use pkg-config --libs --static arpack on Debian
Fortran syntax error on a one-line test file Fixed-form Fortran rules Use multiple lines with column-6 labels or add -ffree-form

References


Summary

You can install ARPACK on Linux through normal distribution packages, without building from source, on Debian and Ubuntu with libarpack2-dev and on RHEL-family systems from EPEL with arpack-devel. Current releases ship ARPACK-NG 3.9.1 even though package names still reference the older ARPACK branding.

The main pitfall on Ubuntu is the runtime rename to libarpack2t64. On RHEL, Rocky Linux, and AlmaLinux the blocker is usually a missing EPEL repository, not a manual BLAS workaround. After install, dpkg -l or rpm -qa confirms packages, ldconfig -p shows shared libraries, and pkg-config --libs arpack returns -larpack when development metadata is present.

Install libarpack2-dev or arpack-devel whenever you compile code. Reach for libparpack2-dev on Debian only when MPI parallel ARPACK is required; on EL 10 the parallel pkg-config files already ship in arpack-devel. Fedora follows the same RPM names as RHEL but typically does not need a separate EPEL step.

Omer Cakmak

Linux Administrator

Highly skilled at managing Debian, Ubuntu, CentOS, Oracle Linux, and Red Hat servers. Proficient in bash scripting, Ansible, and AWX central server management, he handles server operations on OpenStack, KVM, Proxmox, and VMware.

  • Debian
  • Ubuntu
  • Linux
  • Red Hat Enterprise Linux
  • Shell Script
  • System Administration