100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > 给服务器安装Anaconda遇到的问题和解决办法

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

时间:2022-05-01 12:01:31

相关推荐

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

首先如果直接敲

bash Anaconda3-5.2.0-Linux-x86_64.sh

告诉我已存在

ERROR: File or directory already exists: '/root/anaconda3'If you want to update an existing installation, use the -u option.

需要使用

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

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

[/root/anaconda3] >>> PREFIX=/root/anaconda3Anaconda3-5.2.0-Linux-x86_64.sh: line 350: bunzip2: command not foundtar: This does not look like a tar archivetar: Exiting with failure status due to previous errors[root@ml-cent-3 result]# yum install -y bzip2Loaded plugins: fastestmirror/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: ; Unknown error"Trying other mirror.

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

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

[root@ml-cent-3 result]# rpm -ivh wget-1.19.5-3.fc29.x86_64.rpmwarning: wget-1.19.5-3.fc29.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 429476b4: NOKEYerror: Failed dependencies:libgnutls.so.30()(64bit) is needed by wget-1.19.5-3.fc29.x86_64libgnutls.so.30(GNUTLS_3_4)(64bit) is needed by wget-1.19.5-3.fc29.x86_64libidn2.so.0()(64bit) is needed by wget-1.19.5-3.fc29.x86_64libidn2.so.0(IDN2_0.0.0)(64bit) is needed by wget-1.19.5-3.fc29.x86_64libmetalink.so.3()(64bit) is needed by wget-1.19.5-3.fc29.x86_64libnettle.so.6()(64bit) is needed by wget-1.19.5-3.fc29.x86_64libnettle.so.6(NETTLE_6)(64bit) is needed by wget-1.19.5-3.fc29.x86_64libpsl.so.5()(64bit) is needed by wget-1.19.5-3.fc29.x86_64

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

rpm -ivh wget-1.19.5-3.fc29.x86_64.rpm --force --nodeps# 安装后# wgetwget: error while loading shared libraries: libidn2.so.0: cannot open shared object file: No such file or directory

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

[root@ml-cent-3 wget-1.19]# file INSTALLINSTALL: ASCII text[root@ml-cent-3 wget-1.19]# vi INSTALL[root@ml-cent-3 wget-1.19]# ./configure && make && make installconfigure: configuring for GNU Wget 1.19checking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /usr/bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking whether make supports nested variables... yeschecking build system type... x86_64-pc-linux-gnuchecking host system type... x86_64-pc-linux-gnuchecking whether make supports nested variables... (cached) yeschecking for gcc... nochecking for cc... nochecking for cl.exe... noconfigure: error: in `/etc/result/wget-1.19':configure: error: no acceptable C compiler found in $PATHSee `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

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。