Skip to content

Installing .net 10 preview in Codex #623

@Haraldi-Coding

Description

@Haraldi-Coding

I am trying to install the latest .net 10 preview version in OpenAI Codex with the provided dotnet-install.sh script. This works locally in my Debian machine, but not in Codex.

In detail here is a comprehensive description:

Working in Debian as expected (for your reference)

Doing this in on my Ubuntu machine works without any issues:

curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel 10.0 --quality preview

with result

dotnet-install: Attempting to download using aka.ms link https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz
dotnet-install: Remote file https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz size is 245519851 bytes.
dotnet-install: Extracting archive from https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz
dotnet-install: Downloaded file size is 245519851 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Installed version is 10.0.100-preview.6.25358.103
dotnet-install: Adding to current process PATH: `/root/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

(Curl is version 7.88.1 on x86_64-pc-linux-gnu)

Steps to reproduce in Codex with error

Now I am trying to do the same in OpenAI Codex via:

curl -sSL https://dot.net/v1/dotnet-install.sh \
  | bash /dev/stdin --channel 10.0 --quality preview --architecture x64 --verbose

I have also tried the latest script via

curl -sSL https://builds.dotnet.microsoft.com/dotnet/scripts/v1/dotnet-install.sh \
  | bash /dev/stdin --channel 10.0 --quality preview --verbose

Take a moment, the curl command is only to show you the source of the script, downloading the script and running it locally in the console results also in the following error messages. That means, in the end I am calling in Bash

./dotnet-install.sh --channel 10.0 --quality preview --verbose
It tries to use curl (as in the source code of dotnet-install.sh you can check that this is always the first in the if).

The error is always the same:

dotnet-install:�(B Calling: machine_has curl�(B
dotnet-install:�(B Calling: get_http_header_curl https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz true�(B
dotnet-install:�(B Received response: HTTP/1.1 200 OK

dotnet-install: The aka.ms link 'https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz' is not valid: received HTTP code: 200,200.
The installed curl version is:

curl --version
curl 8.5.0 (x86_64-pc-linux-gnu) libcurl/8.5.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 (+libidn2/2.3.7) libssh/0.10.6/openssl/zlib nghttp2/1.59.0 librtmp/2.3 OpenLDAP/2.6.7
Release-Date: 2023-12-06, security patched: 8.5.0-2ubuntu10.6

Ok, I now tried manually, and all is downloading as expected:

curl -sSL https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz -o dotnet.tar.gz --verbose
* Uses proxy env variable no_proxy == 'localhost,127.0.0.1,::1'
* Uses proxy env variable https_proxy == 'http://proxy:8080'
* Host proxy:8080 was resolved.
* IPv6: (none)
* IPv4: 172.30.0.19
*   Trying 172.30.0.19:8080...
* Connected to proxy (172.30.0.19) port 8080
* CONNECT tunnel: HTTP/1.1 negotiated
* allocate connect buffer
* Establish HTTP proxy tunnel to aka.ms:443
> CONNECT aka.ms:443 HTTP/1.1
> Host: aka.ms:443
> User-Agent: curl/8.5.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 OK
< date: Sat, 19 Jul 2025 21:25:48 GMT
< server: envoy
< 
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: curl offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
*  CAfile: /usr/local/share/ca-certificates/envoy-mitmproxy-ca-cert.crt
*  CApath: /etc/ssl/certs
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [6 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [1556 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [78 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / id-ecPublicKey
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
*  subject: CN=aka.ms
*  start date: Jul 19 21:21:20 2025 GMT
*  expire date: Jul 19 21:22:20 2026 GMT
*  subjectAltName: host "aka.ms" matched cert's "aka.ms"
*  issuer: C=US; ST=California; L=San Francisco; O=OpenAI; CN=egress-proxy
*  SSL certificate verify ok.
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* using HTTP/1.x
} [5 bytes data]
> GET /dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz HTTP/1.1
> Host: aka.ms
> User-Agent: curl/8.5.0
> Accept: */*
> 
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [198 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [198 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
< HTTP/1.1 301 Moved Permanently
< content-length: 0
< server: envoy
< location: https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz
< request-context: appId=cid-v1:d94c0f68-64bf-4036-8409-a0e761bb7ee1
< x-response-cache-status: True
< expires: Sat, 19 Jul 2025 21:25:48 GMT
< cache-control: max-age=0, no-cache, no-store
< pragma: no-cache
< date: Sat, 19 Jul 2025 21:25:48 GMT
< strict-transport-security: max-age=31536000 ; includeSubDomains
< x-envoy-upstream-service-time: 46
< 
* Connection #0 to host proxy left intact
* Issue another request to this URL: 'https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz'
* Uses proxy env variable no_proxy == 'localhost,127.0.0.1,::1'
* Uses proxy env variable https_proxy == 'http://proxy:8080'
* Hostname proxy was found in DNS cache
*   Trying 172.30.0.19:8080...
* Connected to proxy (172.30.0.19) port 8080
* CONNECT tunnel: HTTP/1.1 negotiated
* allocate connect buffer
* Establish HTTP proxy tunnel to builds.dotnet.microsoft.com:443
> CONNECT builds.dotnet.microsoft.com:443 HTTP/1.1
> Host: builds.dotnet.microsoft.com:443
> User-Agent: curl/8.5.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 OK
< date: Sat, 19 Jul 2025 21:25:48 GMT
< server: envoy
< 
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: curl offers h2,http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
*  CAfile: /usr/local/share/ca-certificates/envoy-mitmproxy-ca-cert.crt
*  CApath: /etc/ssl/certs
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [6 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [1598 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [78 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [52 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [52 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / id-ecPublicKey
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
*  subject: CN=builds.dotnet.microsoft.com
*  start date: Jul 19 21:21:20 2025 GMT
*  expire date: Jul 19 21:22:20 2026 GMT
*  subjectAltName: host "builds.dotnet.microsoft.com" matched cert's "builds.dotnet.microsoft.com"
*  issuer: C=US; ST=California; L=San Francisco; O=OpenAI; CN=egress-proxy
*  SSL certificate verify ok.
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using sha256WithRSAEncryption
*   Certificate level 1: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* using HTTP/1.x
} [5 bytes data]
> GET /dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz HTTP/1.1
> Host: builds.dotnet.microsoft.com
> User-Agent: curl/8.5.0
> Accept: */*
> 
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [198 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [198 bytes data]
* old SSL session ID is stale, removing
{ [5 bytes data]
< HTTP/1.1 200 OK
< content-type: application/octet-stream
< x-ms-request-id: 00c33a57-f01e-0014-1294-f52d0f000000
< x-ms-version: 2009-09-19
< x-ms-lease-status: unlocked
< x-ms-blob-type: BlockBlob
< last-modified: Tue, 15 Jul 2025 14:04:00 GMT
< etag: 0x8DDC3A872C35638
< content-length: 245519851
< cache-control: public, max-age=493264
< date: Sat, 19 Jul 2025 21:25:48 GMT
< akamai-grn: 0.112c2017.1752960348.1e6e8543
< x-envoy-upstream-service-time: 86
< server: envoy
< 
{ [15920 bytes data]
* Connection #1 to host proxy left intact

Ok, I rewrote the dotnet-install.sh script that it now uses wget instead of curl. Uh, this does not work either:

dotnet-install:�(B Calling: get_http_header https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz true�(B
dotnet-install:�(B Calling: machine_has wget�(B
dotnet-install:�(B Calling: get_http_header_wget https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz true�(B
dotnet-install:�(B Received response:   HTTP/1.1 301 Moved Permanently

dotnet-install: The aka.ms link 'https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz' is not valid: failed to get redirect location.
Well, obviously the manual approach works as expected:

wget https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz -v
--2025-07-19 21:32:46--  https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz
Resolving proxy (proxy)... 172.30.0.3
Connecting to proxy (proxy)|172.30.0.3|:8080... connected.
Proxy request sent, awaiting response... 
301 Moved Permanently
Location: https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz [following]
--2025-07-19 21:32:47--  https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz
Connecting to proxy (proxy)|172.30.0.3|:8080... connected.
Proxy request sent, awaiting response... 
200 OK
Length: 245519851 (234M) [application/octet-stream]
Saving to: �dotnet-sdk-linux-x64.tar.gz�

          dotnet-sd   0%[                    ]       0  --.-KB/s               
         dotnet-sdk   2%[                    ]   5.03M  25.1MB/s               
        dotnet-sdk-   9%[>                   ]  22.16M  55.4MB/s               
       dotnet-sdk-l  16%[==>                 ]  37.61M  62.7MB/s               
      dotnet-sdk-li  20%[===>                ]  47.04M  58.8MB/s               
     dotnet-sdk-lin  27%[====>               ]  64.02M  63.8MB/s               
    dotnet-sdk-linu  34%[=====>              ]  81.68M  67.4MB/s               
   dotnet-sdk-linux  40%[=======>            ]  95.42M  67.2MB/s               
  dotnet-sdk-linux-  49%[========>           ] 114.82M  69.8MB/s               
dotnet-sdk-linux-x6  64%[===========>        ] 150.71M  73.7MB/s               
otnet-sdk-linux-x64  72%[=============>      ] 169.55M  75.3MB/s               
net-sdk-linux-x64.t  81%[===============>    ] 191.90M  72.3MB/s               
et-sdk-linux-x64.ta  85%[================>   ] 200.91M  70.1MB/s               
t-sdk-linux-x64.tar  93%[=================>  ] 217.95M  70.7MB/s    eta 0s     
dotnet-sdk-linux-x6 100%[===================>] 234.15M  74.4MB/s    in 3.3s    

2025-07-19 21:32:50 (71.6 MB/s) - �dotnet-sdk-linux-x64.tar.gz� saved [245519851/245519851]

WGet is version

wget --version
GNU Wget 1.21.4 built on linux-gnu.

More information for Curl

Perhaps this is because of the header information that I am getting three times a "HTTP/1.1 200 OK":

curl -I -sSL https://aka.ms/dotnet/10.0/preview/dotnet-sdk-linux-x64.tar.gz
HTTP/1.1 200 OK
date: Sat, 19 Jul 2025 21:50:02 GMT
server: envoy

HTTP/1.1 301 Moved Permanently
server: envoy
location: �]8;;https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz�\https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100-preview.6.25358.103/dotnet-sdk-10.0.100-preview.6.25358.103-linux-x64.tar.gz
�]8;;�\request-context: appId=cid-v1:d94c0f68-64bf-4036-8409-a0e761bb7ee1
x-response-cache-status: True
content-length: 0
expires: Sat, 19 Jul 2025 21:50:02 GMT
cache-control: max-age=0, no-cache, no-store
pragma: no-cache
date: Sat, 19 Jul 2025 21:50:02 GMT
strict-transport-security: max-age=31536000 ; includeSubDomains
x-envoy-upstream-service-time: 75

HTTP/1.1 200 OK
date: Sat, 19 Jul 2025 21:50:02 GMT
server: envoy

HTTP/1.1 200 OK
content-type: application/octet-stream
content-md5: Z93Mal9zvdIeFJvi9mwXww==
last-modified: Tue, 15 Jul 2025 14:04:00 GMT
etag: 0x8DDC3A872C35638
x-ms-request-id: 00c35eca-f01e-0014-2094-f52d0f000000
x-ms-version: 2009-09-19
x-ms-lease-status: unlocked
x-ms-blob-type: BlockBlob
cache-control: public, max-age=491829
date: Sat, 19 Jul 2025 21:50:02 GMT
content-length: 245519851
akamai-grn: 0.2e09d817.1752961802.233d1a36
x-envoy-upstream-service-time: 94
server: envoy

This is different to my local Debian machine where I am getting: Moved Permamently --> OK.

For wget I have no clue.

Any ideas how to fix?

Metadata

Metadata

Assignees

Labels

needs-more-infoMore information is neededuntriagedIssue is awaiting triage

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions