要下载 Mamba 来制作虚拟环境,我总是去这里,它只是告诉我去这里。根据安装说明,我运行给定的 curl 命令在我的 Linux VM 上安装:
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
我得到以下输出/错误:
User@vm-001:~$ curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
.sh % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to objects.githubusercontent.com:443
wget选项给出了类似的错误。
我希望这能够正常工作,就像我之前在设置 Mamba 时在非虚拟机(本地计算机)上一样。据我所知,虚拟机和本地计算机之间的唯一区别是需要将域列入白名单,但域 (GitHub) 是我的虚拟机的白名单站点之一。不过,在可靠的互联网条件下,我不知道还有什么可能导致 SSL 无法连接。想法?
查看 wget 输出可能会揭示问题,实际上:
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
--2024-06-26 22:26:11-- https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
Resolving github.com (github.com)... 140.82.112.3
Connecting to github.com (github.com)|140.82.112.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-Linux-x86_64.sh [following]
--2024-06-26 22:26:11-- https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Miniforge3-Linux-x86_64.sh
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/221584272/44f31adc-7a87-4d05-8e42-82d599d5b648?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240626%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240626T222611Z&X-Amz-Expires=300&X-Amz-Signature=180dffa675f12d6de97386bb7e4405d3f620670821013b725b02daa66a332daf&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=221584272&response-content-disposition=attachment%3B%20filename%3DMiniforge3-Linux-x86_64.sh&response-content-type=application%2Foctet-stream [following]
--2024-06-26 22:26:11-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/221584272/44f31adc-7a87-4d05-8e42-82d599d5b648?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240626%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240626T222611Z&X-Amz-Expires=300&X-Amz-Signature=180dffa675f12d6de97386bb7e4405d3f620670821013b725b02daa66a332daf&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=221584272&response-content-disposition=attachment%3B%20filename%3DMiniforge3-Linux-x86_64.sh&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
Unable to establish SSL connection.
您会在那里看到 302 条回复。这是一个重定向。您使用的curl命令有
-L
,文档显示该命令将遵循重定向。来自curl -h
:
-L, --location Follow redirects
因此,您的请求会在 github 域中来回传递,直到最终被重定向到其他地方(即,objects.githubusercontent.com),此时您的虚拟机白名单就会生效。如果可以的话,请尝试将其添加到您的白名单中。