在搭建生产环境的时候makeinstall报错

来源:16-1 单进程启动服务

aotuman_neo

2018-12-19

1.makeinstall的报错信息如下
$ensurepip --root=/ ;
fi
Traceback (most recent call last):
File “/root/Python-3.6.6/Lib/runpy.py”, line 193, in _run_module_as_main
"main", mod_spec)
File “/root/Python-3.6.6/Lib/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/root/Python-3.6.6/Lib/ensurepip/main.py”, line 5, in
sys.exit(ensurepip._main())
File “/root/Python-3.6.6/Lib/ensurepip/init.py”, line 204, in _main
default_pip=args.default_pip,
File “/root/Python-3.6.6/Lib/ensurepip/init.py”, line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File “/root/Python-3.6.6/Lib/ensurepip/init.py”, line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can’t decompress data; zlib not available
make: *** [install] Error 1

然后我根据网上的教程使用命令 yum -y install zlib*,还是报错了
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; Name or service not known"
Trying other mirror.

One of the configured repositories failed (CentOS-7),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

 1. Contact the upstream for the repository and get them to fix the problem.

 2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

 3. Run the command with the repository temporarily disabled
        yum --disablerepo=base ...

 4. Disable the repository permanently, so yum won't use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:

        yum-config-manager --disable base
    or
        subscription-manager repos --disable=base

 5. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice
    compromise:

        yum-config-manager --save --setopt=base.skip_if_unavailable=true

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - “Could not resolve host: mirrors.cloud.aliyuncs.com; Name or service not known”

写回答

1回答

编程浪子

2018-12-20

"Could not resolve host: mirrors.cloud.aliyuncs.com; Name or service not known"  这句话的意思是 你无法访问这个网站,看看自己的机器网络是不是好的,ping 和curl

0
0

Python Flask构建微信小程序订餐系统(可用于毕设)

微信小程序 + Python Flask 打造订餐系统全栈应用,可用于毕设。

1709 学习 · 1889 问题

查看课程