DESeq2 / Installation errors

Causes and fixes for DESeq2 installation errors

Common errors when installing DESeq2 with BiocManager, listed by exact message, each with its cause and fix.

Short answer

DESeq2 installs from Bioconductor together with dozens of dependencies, so when R is too old, Linux lacks system libraries or a Mac lacks build tools, one dependency fails and DESeq2 cannot install.

Setting up your environment this way avoids most errors on this page.

PracticeWhat happens if you skip it
Install only with BiocManager::install("DESeq2"), not install.packages() or other methods.With mixed install methods, dependencies come from different Bioconductor releases and loading fails.
Use a recent R. Newer versions of locfit, a DESeq2 dependency, require R 4.1.0 or later.On an old R you get dependency locfit is not available and DESeq2 does not install.
On Linux, install system development libraries such as libcurl4-openssl-dev and libxml2-dev first.curl, XML and RCurl fail to compile, and a dozen later packages report non-zero exit status.
On Apple silicon Macs, use the arm64 R from CRAN and install the Xcode command line tools and gfortran as described on mac.r-project.org/tools.Dependencies that need compiling fail at the link step with compilation failed.
If Bioconductor is slow or unreachable from your network, run chooseBioCmirror() and pick a nearby mirror.Downloads fail with unable to access index for repository or drop midway.

Troubleshooting by error message

Find your exact error message. Each entry gives the cause, the fix, and what may come up after the fix.

ERROR: dependency ‘locfit’ is not available for package ‘DESeq2’

Cause: R is too old: the latest locfit on CRAN requires R 4.1.0 or later.

Fix: Upgrade R and install again; if you cannot upgrade yet, install an older locfit first with install.packages("https://cran.r-project.org/src/contrib/Archive/locfit/locfit_1.5-9.4.tar.gz", repos = NULL, type = "source").

What may come next: Old dependency versions on an old R only get you started; other dependencies will keep asking for a newer R.

installation of package ‘curl’ had non-zero exit status (then XML, RCurl, httr, GenomeInfoDb and finally DESeq2 report the same)

Cause: Linux lacks the libcurl and libxml2 development libraries, so curl and XML fail to compile and every package that needs them fails too.

Fix: On Ubuntu run sudo apt install libcurl4-openssl-dev libxml2-dev, then reinstall DESeq2.

What may come next: After these two, some dependencies may also ask for libssl-dev or other development libraries.

clang: error: linker command failed with exit code 1 (then ERROR: compilation failed for package ‘DESeq2’, Apple silicon Mac)

Cause: The Mac lacks gfortran and other build tools, so DESeq2 and genefilter fail to link when compiled from source.

Fix: Install the arm64 R from CRAN, then install the Xcode command line tools and gfortran as described on mac.r-project.org/tools, and install again.

What may come next: A gfortran installed from the gcc website must be declared in ~/.R/Makevars before R can find it.

there is no package called ‘rlang’ (then ERROR: lazy loading failed for package ‘AnnotationDbi’)

Cause: rlang, which AnnotationDbi needs, is not installed, so AnnotationDbi and the annotate and genefilter packages that depend on it all fail.

Fix: Run install.packages("rlang") first, then reinstall DESeq2.

What may come next: Other packages may be missing in the same install, and each one means another rerun.

ERROR: dependencies ‘genefilter’, ‘geneplotter’ are not available for package ‘DESeq2’

Cause: This is a follow-on error: genefilter and geneplotter, or their dependencies, failed earlier.

Fix: Scroll up to the first package with ERROR, handle it with the matching entry on this page, and install again.

Warning: unable to access index for repository https://bioconductor.org/packages/3.13/bioc/src/contrib

Cause: R cannot reach the Bioconductor repository, usually because of a firewall, a proxy or an unstable network.

Fix: Turn off the firewall rule blocking R or configure your proxy; on slow networks, run chooseBioCmirror() to pick a nearby mirror and install again.

What may come next: After switching mirrors, CRAN dependencies must also download; switch CRAN with chooseCRANmirror() if needed.

Installation path not writeable, unable to update packages: mgcv, spatial

Cause: This is not a DESeq2 error. A few recommended packages that ship with R sit in a system folder without write access, so BiocManager cannot update them.

Fix: If the log shows * DONE (DESeq2), DESeq2 is installed and you can ignore the message.

Scientify is a cloud computer with research software installed and AI agents such as Codex and Claude Code built in. Describe what you need in one sentence, for example "run a DESeq2 differential expression analysis on this count matrix and sample sheet and draw a volcano plot", and the agent uses the preinstalled DESeq2 to do the modeling and computation, with no software to install and no code to write.

Compared with installing more on your own computer, the cloud computer already has R 4.4.3 and DESeq2 1.46.0, with edgeR 4.4.0 and limma 3.62.1 from the same Bioconductor release, so there is no locfit, system library or build tool to deal with, and runs continue after you close your laptop.

The cloud computer comes with more computing power: CPU and GPU clusters can be called on demand for large-scale scientific computing. Compute is billed by the minutes you actually use, so nothing is wasted.

Cloud computer
4 vCPU · 8 GB
Top configuration, for data processing and small to medium jobs
Callable GPU
96 GB VRAM
Up to an RTX PRO 6000 per GPU; H800 80 GB and up to 8 × A10G also available
Callable CPU
224 cores · 3 TB
Largest spec, for large parallel computations

References

Frequently asked questions

Can DESeq2 be installed with install.packages()?

No. It is a Bioconductor package: install BiocManager first, then run BiocManager::install("DESeq2").

It asks whether to compile from source. Which should I choose?

Choose no to use prebuilt binaries. Compile from source only when no binary of the version you need exists.

The log has many warnings. Is DESeq2 installed?

If the log ends with * DONE (DESeq2), or library(DESeq2) runs without error, it is installed.

Run differential expression analysis with Scientify without setup

Upload your data, describe the computation, and Scientify runs it on a cloud computer that is already set up. New accounts get a free cloud computer and US$5 in credit.