给服务器安装Anaconda遇到的问题和解决办法

 

 

 

 

 

 

 

首先如果直接敲

bash Anaconda3-5.2.0-Linux-x86_64.sh

告诉我已存在

 
  1. ERROR: File or directory already exists: '/root/anaconda3'

  2. If you want to update an existing installation, use the -u option.

需要使用

bash Anaconda3-5.2.0-Linux-x86_64.sh -u

之后提示没有安装bunzip2,使用以下指令安装,然后还是报错,这次是软件源有问题

 
  1. [/root/anaconda3] >>>

  2. PREFIX=/root/anaconda3

  3. Anaconda3-5.2.0-Linux-x86_64.sh: line 350: bunzip2: command not found

  4. tar: This does not look like a tar archive

  5. tar: Exiting with failure status due to previous errors

  6. [root@ml-cent-3 result]# yum install -y bzip2

  7. Loaded plugins: fastestmirror

  8. http://mirrors.163.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.163.com; Unknown error"

  9. Trying other mirror.

好吧,换个软件源,按照网上的方法来,我发现我没有wget……

只能参考给centos重新安装yum的base-repo源手动下载对应处理器的版本,然后上传到linux上安装wget

 
  1. [root@ml-cent-3 result]# rpm -ivh wget-1.19.5-3.fc29.x86_64.rpm

  2. warning: wget-1.19.5-3.fc29.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 429476b4: NOKEY

  3. error: Failed dependencies:

  4. libgnutls.so.30()(64bit) is needed by wget-1.19.5-3.fc29.x86_64

  5. libgnutls.so.30(GNUTLS_3_4)(64bit) is needed by wget-1.19.5-3.fc29.x86_64

  6. libidn2.so.0()(64bit) is needed by wget-1.19.5-3.fc29.x86_64

  7. libidn2.so.0(IDN2_0.0.0)(64bit) is needed by wget-1.19.5-3.fc29.x86_64

  8. libmetalink.so.3()(64bit) is needed by wget-1.19.5-3.fc29.x86_64

  9. libnettle.so.6()(64bit) is needed by wget-1.19.5-3.fc29.x86_64

  10. libnettle.so.6(NETTLE_6)(64bit) is needed by wget-1.19.5-3.fc29.x86_64

  11. libpsl.so.5()(64bit) is needed by wget-1.19.5-3.fc29.x86_64

报错,百度得知使用下面方式可以安装成功,但是无法使用

 
  1. rpm -ivh wget-1.19.5-3.fc29.x86_64.rpm --force --nodeps

  2. # 安装后

  3. # wget

  4. wget: error while loading shared libraries: libidn2.so.0: cannot open shared object file: No such file or directory

原来下的版本不对,还是去这里下载tar.gz的吧,解压后进入文件夹查看INSTALL文档中有提示安装方法,于是尝试,,结果没有安装gcc,尝试用yum去安装gcc是失败的,以为软件源的问题没解决啊!

 
  1. [root@ml-cent-3 wget-1.19]# file INSTALL

  2. INSTALL: ASCII text

  3. [root@ml-cent-3 wget-1.19]# vi INSTALL

  4. [root@ml-cent-3 wget-1.19]# ./configure && make && make install

  5. configure: configuring for GNU Wget 1.19

  6. checking for a BSD-compatible install... /usr/bin/install -c

  7. checking whether build environment is sane... yes

  8. checking for a thread-safe mkdir -p... /usr/bin/mkdir -p

  9. checking for gawk... gawk

  10. checking whether make sets $(MAKE)... yes

  11. checking whether make supports nested variables... yes

  12. checking build system type... x86_64-pc-linux-gnu

  13. checking host system type... x86_64-pc-linux-gnu

  14. checking whether make supports nested variables... (cached) yes

  15. checking for gcc... no

  16. checking for cc... no

  17. checking for cl.exe... no

  18. configure: error: in `/etc/result/wget-1.19':

  19. configure: error: no acceptable C compiler found in $PATH

  20. See `config.log' for more details

最后解决办法很简单,很粗暴,但是我竟然没有想到,,直接在网易源官网就可以下载repo文件,晕,赶紧下载下来,重命名成CentOS-Base.repo放到/etc/yum.repos.d/,还是不行

最后解决办法

最后对比了下可以正常通过yum安装软件的服务器的export出来的信息,发现其他正常服务器都有设置proxy,就这个服务器没有,果断把proxy设置搬过去,可以正常通过yum安装程序了,说明之前的repo根本没有问题!

之后就可以正常安装Anaconda了,需要注意的是刚装好是用不了conda,pip等命令的,需要添加路径

export PATH=$PATH:/root/anaconda3/bin

转自 https://blog.csdn.net/smileglaze/article/details/81626293 

  • 1
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值