我有本地 pypi 服务器,我在其中上传了cffi
包。
当我尝试搜索时,它会返回包。
$ pip search -i https://localhost --trusted-host localhost cffi
cffi (1.11.4) - 1.11.4
但是当尝试安装时,它给出了错误。
$ pip install -i https://localhost --trusted-host localhost cffi==1.11.4
Collecting cffi==1.11.4
Could not find a version that satisfies the requirement cffi==1.11.4 (from versions: )
No matching distribution found for cffi==1.11.4
我在 webserverpypi
下运行服务器来apache
处理https
.centos
我检查了 apache 日志/var/log/httpd/ssl_access_log
,以获取install
命令。它的回报200
为GET Call
.
127.0.0.1 - - [25/Jan/2018:16:46:23 +0000] "GET /cffi/ HTTP/1.1" 303 -
127.0.0.1 - - [25/Jan/2018:16:46:23 +0000] "GET /simple/cffi/ HTTP/1.1" 200 339
我再次检查日志。因为celery
它有效,之后cffi
它失败了。
127.0.0.1 - - [25/Jan/2018:16:50:58 +0000] "GET /celery/ HTTP/1.1" 303 -
127.0.0.1 - - [25/Jan/2018:16:50:58 +0000] "GET /simple/celery/ HTTP/1.1" 200 321
127.0.0.1 - - [25/Jan/2018:16:50:58 +0000] "GET /packages/celery-4.0.2-py2.py3-none-any.whl HTTP/1.1" 200 396437
127.0.0.1 - - [25/Jan/2018:16:50:59 +0000] "GET /cffi/ HTTP/1.1" 303 -
127.0.0.1 - - [25/Jan/2018:16:50:59 +0000] "GET /simple/cffi/ HTTP/1.1" 200 339
问题是,因为cffi
它没有重定向到/packages/cffi-1.11.4-cp35-cp35m-manylinux1_x86_64.whl
. 而在celery
其去/packages/celery*
之后GET /simple/celery/
。
我试图curl
检查这两个包之间的响应是否有变化,但没有区别。
$ curl -k https://localhost/simple/celery/ -i
HTTP/1.1 200 OK
Date: Thu, 25 Jan 2018 16:59:27 GMT
Server: Apache/2.2.15 (CentOS)
Content-Length: 321
Connection: close
Content-Type: text/html; charset=UTF-8
<html>
<head>
<title>Links for celery</title>
</head>
<body>
<h1>Links for celery</h1>
<a href="/packages/celery-4.0.2-py2.py3-none-any.whl#md5=3ff97b53107b491baeb42f662be14a06">celery-4.0.2-py2.py3-none-any.whl</a><br>
</body>
</html>
$ curl -k https://localhost/simple/cffi/ -i
HTTP/1.1 200 OK
Date: Thu, 25 Jan 2018 16:59:29 GMT
Server: Apache/2.2.15 (CentOS)
Content-Length: 339
Connection: close
Content-Type: text/html; charset=UTF-8
<html>
<head>
<title>Links for cffi</title>
</head>
<body>
<h1>Links for cffi</h1>
<a href="/packages/cffi-1.11.4-cp35-cp35m-manylinux1_x86_64.whl#md5=c9478cf605b4eb2755fa322cc2bf3ddf">cffi-1.11.4-cp35-cp35m-manylinux1_x86_64.whl</a><br>
</body>
</html>