mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.85k stars 353 forks source link

Can not install mamba by using curl #2535

Open Roy-Kid opened 1 year ago

Roy-Kid commented 1 year ago

Troubleshooting docs

How did you install Mamba?

Micromamba

Search tried in issue tracker

IDK

Latest version of Mamba

Tried in Conda?

I do not have this problem with Conda, just with Mamba

Describe your issue

I am using curl micro.mamba.pm/install.sh | zsh to install, but error throwed:

~/graphviz-8.0.5 [ curl micro.mamba.pm/install.sh | zsh                                                                                                     ] 3:48 PM
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   889  100   889    0     0    442      0  0:00:02  0:00:02 --:--:--   442

bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
bzip2: Inappropriate ioctl for device
        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

tar: Child returned status 2
tar: Error is not recoverable: exiting now
zsh: no such file or directory: /home/roy/.local/bin/micromamba

My OS is a brand new ubuntu 20 in wsl and the same error also occurs in another PC which conda is good to go. How should I fix this and is there any info can i provide to help you fix this?

mamba info / micromamba info

No response

Logs

No response

environment.yml

No response

~/.condarc

No response

jonashaag commented 1 year ago

Are you behind a proxy or something?

wolfv commented 1 year ago

Note that this URL redirects to Anaconda servers and sometimes they are acting up.

You can also try the following command from here: https://github.com/mamba-org/micromamba-releases

curl https://micromamba.pfx.dev/install.sh | zsh

Roy-Kid commented 1 year ago

Are you behind a proxy or something?

It is highly likely to be However, I am in a very magical country and it is difficult to download without a proxy I'll give it a try with the link that @wolfv gives me. Thanks for your helping~

Roy-Kid commented 1 year ago

Note that this URL redirects to Anaconda servers and sometimes they are acting up.

You can also try the following command from here: https://github.com/mamba-org/micromamba-releases

curl https://micromamba.pfx.dev/install.sh | zsh

I'm sorry, It doesn't seem to work:

~ [ proxy set                                                                                                                                                                                                                                  ] 7:01 PM
set proxy:  http://172.21.96.1:7890
~ [ wget google.com                                                                                                                                                                                                                            ] 7:01 PM
--2023-05-18 19:01:13--  http://google.com/
Connecting to 172.21.96.1:7890... connected.
Proxy request sent, awaiting response... 301 Moved Permanently
Location: http://www.google.com/ [following]
--2023-05-18 19:01:14--  http://www.google.com/
Reusing existing connection to 172.21.96.1:7890.
Proxy request sent, awaiting response... 302 Found
Location: http://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=http://www.google.com.hk/&ust=1684407700723696&usg=AOvVaw3qSr8cPY43B3oFm2cMQGKb [following]
--2023-05-18 19:01:14--  http://www.google.com.hk/url?sa=p&hl=zh-CN&pref=hkredirect&pval=yes&q=http://www.google.com.hk/&ust=1684407700723696&usg=AOvVaw3qSr8cPY43B3oFm2cMQGKb
Reusing existing connection to 172.21.96.1:7890.
Proxy request sent, awaiting response... 302 Found
Location: http://www.google.com.hk/ [following]
--2023-05-18 19:01:16--  http://www.google.com.hk/
Reusing existing connection to 172.21.96.1:7890.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html’

index.html                                                         [ <=>                                                                                                                                              ]  16.82K  --.-KB/s    in 0.1s    

2023-05-18 19:01:16 (115 KB/s) - ‘index.html’ saved [17225]

~ [ curl https://micromamba.pfx.dev/install.sh | zsh                                                                                                                                                                                           ] 7:01 PM
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1434    0  1434    0     0    899      0 --:--:--  0:00:01 --:--:--   898
curl: (23) Failed writing body (0 != 890)
~ [ source proxy.sh set                                                                                                                                                                                                                        ] 7:01 PM
~ [ source proxy.sh unset                                                                                                                                                                                                                      ] 7:01 PM
~ [ curl https://micromamba.pfx.dev/install.sh | zsh                                                                                                                                                                                           ] 7:02 PM
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1434    0  1434    0     0   1501      0 --:--:-- --:--:-- --:--:--  1501
curl: (23) Failed writing body (0 != 1397)
~ [                                                                                                                                                                                                                                            ] 7:02 PM
jonashaag commented 1 year ago

Try directly downloading some of the files from here: https://github.com/mamba-org/micromamba-releases/releases/tag/1.4.3-0

Does that work with curl?

Roy-Kid commented 1 year ago

For ubuntu, I just need to download [micromamba-linux-64](https://github.com/mamba-org/micromamba-releases/releases/download/1.4.3-0/micromamba-linux-64) and place it under ~/.local/bin? How should I init the mamba and write some scripts in .zshrc?

jonashaag commented 1 year ago

I was just wondering if you can download that URL with curl directly.

Roy-Kid commented 1 year ago

I was just wondering if you can download that URL with curl directly.

By typing `` curl https://github.com/mamba-org/micromamba-releases/releases/tag/1.4.3-0


No. This url is a web page and curl it will get a github html. I can wget the asserts in this page.
jonashaag commented 1 year ago
curl -v https://github.com/mamba-org/micromamba-releases/releases/download/1.4.3-0/micromamba-linux-64

?

Roy-Kid commented 1 year ago
curl -v https://github.com/mamba-org/micromamba-releases/releases/download/1.4.3-0/micromamba-linux-64

?

work/molcpp [ curl -v https://github.com/mamba-org/micromamba-releases/releases/download/1.4.3-0/micromamba-linux-64                                                                                                            refactor_RAII ] 10:22 AM
* Uses proxy env variable https_proxy == 'http://172.25.192.1:7890'
*   Trying 172.25.192.1:7890...
* TCP_NODELAY set
* Connected to 172.25.192.1 (172.25.192.1) port 7890 (#0)
* allocate connect buffer!
* Establish HTTP proxy tunnel to github.com:443
> CONNECT github.com:443 HTTP/1.1
> Host: github.com:443
> User-Agent: curl/7.68.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection established
< 
* Proxy replied 200 to CONNECT request
* CONNECT phase completed!
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CONNECT phase completed!
* CONNECT phase completed!
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com
*  start date: Feb 14 00:00:00 2023 GMT
*  expire date: Mar 14 23:59:59 2024 GMT
*  subjectAltName: host "github.com" matched cert's "github.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS Hybrid ECC SHA384 2020 CA1
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5561a2e308f0)
> GET /mamba-org/micromamba-releases/releases/download/1.4.3-0/micromamba-linux-64 HTTP/2
> Host: github.com
> user-agent: curl/7.68.0
> accept: */*
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 302 
< server: GitHub.com
< date: Fri, 19 May 2023 02:22:59 GMT
< content-type: text/html; charset=utf-8
< vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With
< location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/610793335/678062bd-0d12-4f2f-81b4-9784b262796a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20230519%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230519T022259Z&X-Amz-Expires=300&X-Amz-Signature=1143e46dbb589e617845d432e01f6b6aa6b6f2cbd58d31df6ae25a8d6b5f1dbe&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=610793335&response-content-disposition=attachment%3B%20filename%3Dmicromamba-linux-64&response-content-type=application%2Foctet-stream
< cache-control: no-cache
< strict-transport-security: max-age=31536000; includeSubdomains; preload
< x-frame-options: deny
< x-content-type-options: nosniff
< x-xss-protection: 0
< referrer-policy: no-referrer-when-downgrade
< content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com objects-origin.githubusercontent.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events *.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ wss://*.actions.githubusercontent.com github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com objects-origin.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/
< content-length: 0
< x-github-request-id: 3121:9BD6:7A5CB55:8017263:6466DD82
< 
* Connection #0 to host 172.25.192.1 left intact
work/molcpp [             
jonashaag commented 1 year ago

Ah sorry add -L

but it seems to work fine with curl so I wonder what’s wrong with the script

Roy-Kid commented 1 year ago

Sorry. I have no clue what has happened. I have tried to install it on my brand-new Ubuntu OS, and it still doesn't work. So that doesn't involve something such as dependencies conflict.