Dada2 error: shared object 'Rcpp.so' not found

Hi,
I am in the process of learning how to use qiime2 and I got an error when denoising with DADA2:

qiime dada2 denoise-paired \

--i-demultiplexed-seqs demultiplexed-sequences.qza
--p-trunc-len-f 204
--p-trim-left-r 1
--p-trunc-len-r 205
--o-representative-sequences asv-sequences-0.qza
--o-table feature-table-0.qza
--o-denoising-stats dada2-stats.qza
--verbose

Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_dada_paired.R /var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/forward /var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/reverse /var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/output.tsv.biom /var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/track.tsv /var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/filt_f /var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/filt_r 204 205 0 1 2.0 2.0 2 12 independent consensus 1.0 1 1000000

R version 4.1.2 (2021-11-01)
Loading required package: Rcpp
Error: package or namespace load failed for 'Rcpp' in library.dynam(lib, package, package.lib):
** shared object 'Rcpp.so' not found**
Error: package 'Rcpp' could not be loaded
Execution halted
Traceback (most recent call last):
File "/Users/laljxxxx/miniconda3/envs/qiime2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 266, in denoise_paired
run_commands([cmd])
File "/Users/laljxxxx/miniconda3/envs/qiime2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 36, in run_commands
subprocess.run(cmd, check=True)
File "/Users/laljxxxx/miniconda3/envs/qiime2/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['run_dada_paired.R', '/var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/forward', '/var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/reverse', '/var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/output.tsv.biom', '/var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/track.tsv', '/var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/filt_f', '/var/folders/36/2cm5rcw91rq1yl80f49j3kdr0000gn/T/tmp42ih8_qd/filt_r', '204', '205', '0', '1', '2.0', '2.0', '2', '12', 'independent', 'consensus', '1.0', '1', '1000000']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/laljxxxx/miniconda3/envs/qiime2/lib/python3.8/site-packages/q2cli/commands.py", line 339, in call
results = action(**arguments)
File "", line 2, in denoise_paired
File "/Users/laljxxxx/miniconda3/envs/qiime2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 245, in bound_callable
outputs = self.callable_executor(scope, callable_args,
File "/Users/laljxxxx/miniconda3/envs/qiime2/lib/python3.8/site-packages/qiime2/sdk/action.py", line 391, in callable_executor
output_views = self._callable(**view_args)
File "/Users/laljxxxx/miniconda3/envs/qiime2/lib/python3.8/site-packages/q2_dada2/_denoise.py", line 279, in denoise_paired
raise Exception("An error was encountered while running DADA2"
Exception: An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

Plugin error from dada2:

An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.

See above for debug info.


I am working on a Mac with chip M1 (using rosetta terminal), the qimme version is 2021.11.0 and the conda version 4.11.0.

I tried this to solve the problem, but anything worked:

  • I manually installed "Rcpp" package in R.
  • I updated R.
  • I updated conda, cleaned the cache, delete the qiime2 environment and create it again.

Could you help me to figure out what I can do to solve the problem, please?

Hi @lalj,

Welcome to the :qiime2: forum!

It looks like you've done a great job trying to get this to work using M1! Unfortunately we don't have a way to test the compatibility of M1 against QIIME 2 packages right now. There is support for some packages on conda-forge, but unfortunately not on bioconda - which is most likely where this error is coming from (some missing dependencies).

You could try running Docker within your rosetta environment to see if that is successful? Otherwise, potentially finding access to another non-M1 machine if that's a feasible option.

Best of luck, let me know if you have any other questions! :lizard:

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.