我试图用conda安装给定版本的perl-bioperl:
$ conda install -c conda-forge perl
$ which perl
/home/hakon/miniconda3/bin/perl
$ perl --version
This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-linux-thread-multi
$ conda install -c bioconda perl-bioperl=1.7.8
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions
Package zlib conflicts for:
perl-bioperl=1.7.8 -> perl-bio-samtools -> zlib[version='>=1.2.11,<1.3.0a0']
python=3.9 -> zlib[version='>=1.2.11,<1.3.0a0']
Package libgcc-ng conflicts for:
python=3.9 -> zlib[version='>=1.2.11,<1.3.0a0'] -> libgcc-ng[version='>=7.2.0']
python=3.9 -> libgcc-ng[version='>=7.3.0|>=7.5.0']The following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.31=0
- feature:|@/linux-64::__glibc==2.31=0
Your installed version is: 2.31
$ conda list | grep zlib
zlib 1.2.11 h7f8727e_4
$ conda list | grep libgcc-ng
libgcc-ng 9.3.0 h5101ec6_17
这让我很困惑。例如,这条消息:
Package zlib conflicts for:
perl-bioperl=1.7.8 -> perl-bio-samtools -> zlib[version='>=1.2.11,<1.3.0a0']
python=3.9 -> zlib[version='>=1.2.11,<1.3.0a0']
当我当前版本的zlib是:
$ conda list | grep zlib
zlib 1.2.11 h7f8727e_4
我能做些什么来解决这场冲突(如果是冲突的话)?
发布于 2022-05-06 13:10:42
所有的Bioconda包都是用非常具体的信道优先级 (即conda-forge > bioconda > defaults
)生成的,如果不遵循这一点,就无法保证正确的求解和动态库引用。因此,一个适当的临时安装命令应该是
conda install -c conda-forge -c bioconda -c defaults perl-bioperl=1.7.8
鼓励工作流
然而,我强烈鼓励生物信息工作者(以及其他重视可复制工作流的从业者)不要使用临时命令。相反,采用只使用YAML文件来定义软件环境的做法:
bioperl_1_7_8.yaml
name: bioperl_1_7_8
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- perl
- bioperl=1.7.8
将此与conda env create -f bioperl_1_7_8.yaml
一起使用。
发布于 2022-05-04 15:59:21
解决办法是创建一个新环境,将conda-forge
作为默认通道(请参阅这答案),而不是安装到基本环境中:
$ conda create --name perl
$ conda activate perl
$ conda config --add channels conda-forge
$ conda config --set channel_priority strict
$ conda install perl
$ conda install -c bioconda perl-bioperl=1.7.8
https://stackoverflow.com/questions/72114263
复制相似问题