我正在安装新服务器,并想安装gcc-5 / 6/7。我没有对该服务器的root访问权限,所以我选择conda来安装自己的环境。但是,有些错误发生了。有人知道如何解决吗?
我运行了命令“ conda install -v -cquantstack gcc-7”
输出如下所示:
发生了意外错误。
请考虑将以下信息发布到
conda GitHub问题跟踪器,位于:
https://github.com/conda/conda/issues
当前的conda安装:
platform : linux-64
conda version : 4.3.30
conda is private : False
conda-env version : 4.3.30
conda-build version : 3.10.5
python version : 3.6.5.final.0
requests version : 2.18.4
root environment : /mnt/lustre/heyue/anaconda3 (writable)
default environment : /mnt/lustre/heyue/anaconda3/envs/pytorch_1_0
envs directories : /mnt/lustre/heyue/anaconda3/envs
/home/heyue/.conda/envs
package cache : /mnt/lustre/heyue/anaconda3/pkgs
/home/heyue/.conda/pkgs
channel URLs : https://conda.anaconda.org/quantstack/linux-64
https://conda.anaconda.org/quantstack/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/menpo/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
https://repo.continuum.io/pkgs/main/linux-64
https://repo.continuum.io/pkgs/main/noarch
https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/linux-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
config file : /home/heyue/.condarc
netrc file : None
offline mode : False
user-agent : conda/4.3.30 requests/2.18.4 CPython/3.6.5 Linux/3.10.0-327.36.3.el7.x86_64 CentOS Linux/7.2.1511 glibc/2.17
UID:GID : 15665:15665
$ /mnt/lustre/heyue/anaconda3/envs/pytorch_1_0/bin/conda install -v -c quantstack gcc-7
Traceback (most recent call last):
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 497, in run_script
subprocess_call(command_args, env=env, path=dirname(path))
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/gateways/subprocess.py", line 56, in subprocess_call
output=_format_output(command_str, path, rc, stdout, stderr))
subprocess.CalledProcessError: Command '['/bin/bash', '-x', '/mnt/lustre/heyue/anaconda3/envs/pytorch_1_0/bin/.gcc-7-post-link.sh']' returned non-zero exit status 2.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 327, in _execute_actions
run_script(target_prefix, Dist(pkg_data), 'post-unlink' if is_unlink else 'post-link')
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 513, in run_script
raise LinkError(message)
conda.exceptions.LinkError: post-link script failed for package quantstack::gcc-7-7.2.0-2
running your command again with `-v` will provide additional information
location of failed script: /mnt/lustre/heyue/anaconda3/envs/pytorch_1_0/bin/.gcc-7-post-link.sh
==> script messages <==
<None>
在处理上述异常期间,发生了另一个异常:
Traceback (most recent call last):
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 281, in execute
pkg_data, actions)
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 344, in _execute_actions
reverse_excs,
conda.CondaMultiError: post-link script failed for package quantstack::gcc-7-7.2.0-2
running your command again with `-v` will provide additional information
location of failed script: /mnt/lustre/heyue/anaconda3/envs/pytorch_1_0/bin/.gcc-7-post-link.sh
==> script messages <==
<None>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/exceptions.py", line 640, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 140, in _main
exit_code = args.func(args, p)
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/cli/main_install.py", line 80, in execute
install(args, parser, 'install')
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/cli/install.py", line 326, in install
execute_actions(actions, index, verbose=not context.quiet)
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/plan.py", line 828, in execute_actions
execute_instructions(plan, index, verbose)
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/instructions.py", line 247, in execute_instructions
cmd(state, arg)
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/instructions.py", line 108, in UNLINKLINKTRANSACTION_CMD
txn.execute()
File "/mnt/lustre/heyue/anaconda3/lib/python3.6/site-packages/conda/core/link.py", line 297, in execute
rollback_excs,
conda.CondaMultiError: post-link script failed for package quantstack::gcc-7-7.2.0-2
running your command again with `-v` will provide additional information
location of failed script: /mnt/lustre/heyue/anaconda3/envs/pytorch_1_0/bin/.gcc-7-post-link.sh
==> script messages <==
<None>
conda install -v -cquantstack gcc-7
我希望gcc的版本为5或更高版本。
答案 0 :(得分:0)
我使用miniconda v4.7.12获得了gcc v7:
conda install -c anaconda gcc_linux-64
此处有更多详细信息:https://www.anaconda.com/utilizing-the-new-compilers-in-anaconda-distribution-5/
https://anaconda.org/anaconda/gcc_linux-64/files
$ x86_64-conda_cos6-linux-gnu-gcc --version
x86_64-conda_cos6-linux-gnu-gcc (crosstool-NG 1.23.0.449-a04d0) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.