1. 问题来源

  1. 系统环境:WINDOWS10 子系统 Ubuntu-18.04 LTS
  2. Anaconda环境:Anaconda3-2020.07-Linux-x86_64
  3. 最初的报错及其描述:

(1)创建一个新环境并尝试安装R4.0:

(pytorch) wangyue@LAPTOP-FMOR2BIN:conda create -n R_env python=3.6
(pytorch) wangyue@LAPTOP-FMOR2BIN: conda activate R_env
(R_env) wangyue@LAPTOP-FMOR2BIN:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
(R_env) wangyue@LAPTOP-FMOR2BIN: conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
(R_env) wangyue@LAPTOP-FMOR2BIN:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
(R_env) wangyue@LAPTOP-FMOR2BIN: conda config --set show_channel_urls yes
(R_env) wangyue@LAPTOP-FMOR2BIN:conda config --show
(R_env) wangyue@LAPTOP-FMOR2BIN: conda search R
Loading channels: done
# Name                       Version           Build  Channel
r                              3.1.2               0  pkgs/r
r                              3.1.2               0  pkgs/r
r                              3.1.2               1  pkgs/r
r                              3.1.2               1  pkgs/r
r                              3.1.2               2  pkgs/r
r                              3.1.2               2  pkgs/r
r                              3.1.2               3  pkgs/r
r                              3.1.2               3  pkgs/r
r                              3.1.3               0  pkgs/r
r                              3.1.3               0  pkgs/r
r                              3.2.0               0  pkgs/r
r                              3.2.0               0  pkgs/r
r                              3.2.1               0  pkgs/r
r                              3.2.1               0  pkgs/r
r                              3.2.2               0  pkgs/r
r                              3.2.2               0  pkgs/r
r                              3.3.1        r3.3.1_0  pkgs/r
r                              3.3.1        r3.3.1_0  pkgs/r
r                              3.3.1        r3.3.1_1  pkgs/r
r                              3.3.1        r3.3.1_1  pkgs/r
r                              3.3.2        r3.3.2_0  anaconda/cloud/conda-forge
r                              3.3.2        r3.3.2_0  pkgs/r
r                              3.3.2        r3.3.2_0  pkgs/r
r                              3.4.1        r3.4.1_0  anaconda/cloud/conda-forge
r                              3.4.1        r3.4.1_0  pkgs/r
r                              3.4.1        r3.4.1_0  pkgs/r
r                              3.4.2      h65d9972_0  pkgs/r
r                              3.4.2      h65d9972_0  pkgs/r
r                              3.4.3        mro343_0  pkgs/r
r                              3.4.3        mro343_0  pkgs/r
r                              3.4.3          r343_0  pkgs/r
r                              3.4.3          r343_0  pkgs/r
r                              3.5.0        mro350_0  pkgs/r
r                              3.5.0        mro350_0  pkgs/r
r                              3.5.0          r350_0  pkgs/r
r                              3.5.0          r350_0  pkgs/r
r                              3.5.1        mro351_0  pkgs/r
r                              3.5.1        mro351_0  pkgs/r
r                              3.5.1          r351_0  anaconda/cloud/conda-forge
r                              3.5.1          r351_0  pkgs/r
r                              3.5.1          r351_0  pkgs/r
r                              3.5.1       r351_1000  anaconda/cloud/conda-forge
r                              3.5.1        r35_1002  anaconda/cloud/conda-forge
r                              3.5.1        r35_1003  anaconda/cloud/conda-forge
r                              3.6.0           r36_0  pkgs/r
r                              3.6.0           r36_0  pkgs/r
r                                3.6        r36_1002  anaconda/cloud/conda-forge
r                                3.6        r36_1003  anaconda/cloud/conda-forge
r                                3.6        r36_1004  anaconda/cloud/conda-forge
r                                4.0        r40_1004  anaconda/cloud/conda-forge

使用conda安装R4.0

(R_env) wangyue@LAPTOP-FMOR2BIN:$ conda install R=4.0
Collecting package metadata (current_repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists.  anaconda/cloud/conda-forge::certifi-2020.11.8-py36h5fab9bb_0
  openssl                       pkgs/free::openssl-1.0.2l-0 --> anaconda/cloud/conda-forge::openssl-1.1.1h-h516909a_0
  python                          pkgs/free::python-3.6.2-0 --> anaconda/cloud/conda-forge::python-3.6.11-h4d41432_2_cpython
  readline                        pkgs/free::readline-6.2-2 --> anaconda/cloud/conda-forge::readline-8.0-he28a2e2_2
  sqlite                         pkgs/free::sqlite-3.13.0-0 --> anaconda/cloud/conda-forge::sqlite-3.33.0-h4cf870e_1
  tk                                 pkgs/free::tk-8.5.18-0 --> anaconda/cloud/conda-forge::tk-8.6.10-hed695b0_1
  xz                                  pkgs/free::xz-5.2.3-0 --> anaconda/cloud/conda-forge::xz-5.2.5-h516909a_1


Proceed ([y]/n)? y

然后会在Verifying transaction时失败,并出现以下报错。

Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT 
   CONDA_BACKUP_ADDR2LINE=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          addr2line
          CONDA_BACKUP_AR=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-ar
          CONDA_BACKUP_AS=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-as
          CONDA_BACKUP_CC=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-cc
      CONDA_BACKUP_CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-
                          strong -fno-plt -O2 -ffunction-sections -pipe -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
CONDA_BACKUP_CMAKE_PREFIX_PATH=/mnt/f/Linux/anaconda/envs/pytorch:/mnt/f/Linux/anaconda/envs/pytorch/
                          x86_64-conda_cos6-linux-gnu/sysroot/usr
CONDA_BACKUP_CONDA_BUILD_SYSROOT=/mnt/f/Linux/anaconda/envs/pytorch/x86_64-conda_cos6-linux-gnu/sysroot
         CONDA_BACKUP_CPP=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-cpp
    CONDA_BACKUP_CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
         CONDA_BACKUP_CXX=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-c++
     CONDA_BACKUP_CXXFILT=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-
                          gnu-c++filt
    CONDA_BACKUP_CXXFLAGS=-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0
                          -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-
                          strong -fno-plt -O2 -ffunction-sections -pipe -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
CONDA_BACKUP_DEBUG_CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-
                          all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments
                          -ffunction-sections -pipe -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
CONDA_BACKUP_DEBUG_CPPFLAGS=-D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
CONDA_BACKUP_DEBUG_CXXFLAGS=-fvisibility-inlines-hidden -std=c++17 -fmessage-length=0
                          -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-
                          all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments
                          -ffunction-sections -pipe -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
CONDA_BACKUP_DEBUG_FFLAGS=-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-
                          protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
CONDA_BACKUP_DEBUG_FORTRANFLAGS=-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-
                          protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
     CONDA_BACKUP_ELFEDIT=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          elfedit
         CONDA_BACKUP_F77=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          gfortran
         CONDA_BACKUP_F90=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          gfortran
         CONDA_BACKUP_F95=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-f95
          CONDA_BACKUP_FC=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          gfortran
      CONDA_BACKUP_FFLAGS=-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-
                          protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
CONDA_BACKUP_FORTRANFLAGS=-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-
                          protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem
                          /mnt/f/Linux/anaconda/envs/pytorch/include
         CONDA_BACKUP_GCC=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-gcc
      CONDA_BACKUP_GCC_AR=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          gcc-ar
      CONDA_BACKUP_GCC_NM=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          gcc-nm
  CONDA_BACKUP_GCC_RANLIB=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          gcc-ranlib
    CONDA_BACKUP_GFORTRAN=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          gfortran
       CONDA_BACKUP_GPROF=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          gprof
         CONDA_BACKUP_GXX=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-g++
        CONDA_BACKUP_HOST=x86_64-conda_cos6-linux-gnu
          CONDA_BACKUP_LD=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-ld
     CONDA_BACKUP_LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,
                          --disable-new-dtags -Wl,--gc-sections
                          -Wl,-rpath,/mnt/f/Linux/anaconda/envs/pytorch/lib -Wl,-rpath-
                          link,/mnt/f/Linux/anaconda/envs/pytorch/lib
                          -L/mnt/f/Linux/anaconda/envs/pytorch/lib
     CONDA_BACKUP_LD_GOLD=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          ld.gold
          CONDA_BACKUP_NM=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-nm
     CONDA_BACKUP_OBJCOPY=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          objcopy
     CONDA_BACKUP_OBJDUMP=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          objdump
      CONDA_BACKUP_RANLIB=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          ranlib
     CONDA_BACKUP_READELF=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          readelf
        CONDA_BACKUP_SIZE=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          size
     CONDA_BACKUP_STRINGS=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          strings
       CONDA_BACKUP_STRIP=/mnt/f/Linux/anaconda/envs/pytorch/bin/x86_64-conda_cos6-linux-gnu-
                          strip
CONDA_BACKUP__CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_conda_cos6_linux_gnu
        CONDA_DEFAULT_ENV=R_env
                CONDA_EXE=/mnt/f/Linux/anaconda/bin/conda
             CONDA_PREFIX=/mnt/f/Linux/anaconda/envs/R_env
           CONDA_PREFIX_1=/mnt/f/Linux/anaconda
           CONDA_PREFIX_2=/mnt/f/Linux/anaconda/envs/pytorch
    CONDA_PROMPT_MODIFIER=(R_env)
         CONDA_PYTHON_EXE=/mnt/f/Linux/anaconda/bin/python
               CONDA_ROOT=/mnt/f/Linux/anaconda
              CONDA_SHLVL=3
                     PATH=/mnt/f/Linux/anaconda/bin:/mnt/f/Linux/anaconda/envs/R_env/bin:/mnt/f/
                          Linux/anaconda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/
                          bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files/Window
                          sApps/CanonicalGroupLimited.Ubuntu18.04onWindows_1804.2020.824.0_x64__
                          79rhkp1fndgsc:/mnt/c/Program Files/AdoptOpenJDK/jdk-11.0.7.10-hotspot/
                          bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbe
                          m:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System
                          32/OpenSSH:/mnt/c/Program Files (x86)/NVIDIA
                          Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA
                          Corporation/NVIDIA NvDLISR:/mnt/d/计算机软件/putty:/mnt/d/software
                          files/MATLAB2016/runtime/win64:/mnt/d/software
                          files/MATLAB2016/bin:/mnt/d/software
                          files/MATLAB2016/polyspace/bin:/mnt/c/Program Files (x86)/Windows
                          Kits/8.1/Windows Performance Toolkit:/mnt/d/Anaconda3:/mnt/d/Anaconda3
                          /Library/mingw-w64/bin:/mnt/d/Anaconda3/Library/usr/bin:/mnt/d/Anacond
                          a3/Library/bin:/mnt/d/Anaconda3/Scripts:/mnt/c/Users/WangYue/AppData/L
                          ocal/Microsoft/WindowsApps:/snap/bin
       REQUESTS_CA_BUNDLE=
            SSL_CERT_FILE=

     active environment : R_env
    active env location : /mnt/f/Linux/anaconda/envs/R_env
            shell level : 3
       user config file : /home/wangyue/.condarc
 populated config files : /home/wangyue/.condarc
          conda version : 4.8.3
    conda-build version : 3.18.11
         python version : 3.8.3.final.0
       virtual packages : __glibc=2.27
       base environment : /mnt/f/Linux/anaconda  (writable)
           channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/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/pkgs/free/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r/linux-64
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/r/noarch
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro/linux-64
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/pro/noarch
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2/linux-64
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/msys2/noarch
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/mro/linux-64
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/mro/noarch
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free/linux-64
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/free/noarch
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main/linux-64
                          https://anaconda.mirrors.sjtug.sjtu.edu.cn/pkgs/main/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /mnt/f/Linux/anaconda/pkgs
                          /home/wangyue/.conda/pkgs
       envs directories : /mnt/f/Linux/anaconda/envs
                          /home/wangyue/.conda/envs
               platform : linux-64
             user-agent : conda/4.8.3 requests/2.24.0 CPython/3.8.3 Linux/4.4.0-18362-Microsoft ubuntu/18.04.5 glibc/2.27
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?

[y/N]: N

判断其中比较关键的提示有:

OSError: [Errno 40] Too many levels of symbolic links: '/mnt/f/Linux/anaconda/pkgs/ncurses-6.2-h58526e2_4/share/terminfo/N/NCR260VT300WPP'
user-agent : conda/4.8.3 requests/2.24.0 CPython/3.8.3 Linux/4.4.0-18362-Microsoft ubuntu/18.04.5 glibc/2.27

2. 问题的后果

此报错会引起非常严重的后果,导致后续在Anaconda的任何虚拟环境中安装指定版本的包(即在安装时使用conda install matplotlib=N的命令)时都会报错,在创建指定python版本的conda环境时也会报错(conda create -n test python=3.6)。更为严重的是,这种错误无法通过卸载Anaconda并重装来解决(sudo rm -rf path/anaconda3),重装后仍然会发生相同的报错。

3. 解决方法

目前尝试的唯一可行的解决方法是重置Linux系统。

文章来源于互联网,如有雷同请联系站长删除:无法解决的报错问题,不知道是否是Linux子系统的问题

发表评论