Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.72k forks source link

Mactex installation not working #182437

Closed gonditeniz closed 2 months ago

gonditeniz commented 2 months ago

Verification

Description of issue

Fresh mac installation of a Mac Book Pro Apple M1 Pro (2021) with Sonoma 14.6.1.

Fresh installation of brew using the command in https://brew.sh/

Trying to install mactex (brew install --cask mactex-no-gui) the command get stucks. Installing other casks (e.g. google-chome) worked.

Working in MacBook Pro Apple M1 Max (2021) with Sonoma 14.5.

Command that failed

eeb.

Output of command with --verbose --debug

brew install --verbose --debug --cask mactex-no-gui
==> Downloading https://formulae.brew.sh/api/cask.jws.json
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --fail --remote-time --output /Users/gonditeniz/Library/Caches/Homebrew/api/cask.jws.json --location --time-cond /Users/gonditeniz/Library/Caches/Homebrew/api/cask.jws.json --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --fail --compressed --speed-limit 100 --speed-time 5 https://formulae.brew.sh/api/cask.jws.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1478k  100 1478k    0     0  13.3M      0 --:--:-- --:--:-- --:--:-- 13.4M
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex-no-gui
==> Cask::Installer#install
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading basictex
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex
==> Printing caveats
==> Caveats
You must restart your terminal window for the installation of MacTeX CLI
tools to take effect.

Alternatively, Bash and Zsh users can run the command:

  eval "$(/usr/libexec/path_helper)"

==> Cask::Installer#fetch
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg

Output of brew doctor and brew config

brew doctor
Your system is ready to brew.

brew config
HOMEBREW_VERSION: 4.3.15
ORIGIN: https://github.com/Homebrew/brew
HEAD: fa53e7b1e51a2deb7ec5a1e12452a1182dc342f7
Last commit: 2 days ago
Core tap JSON: 14 Aug 16:22 UTC
Core cask tap JSON: 14 Aug 16:45 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 3.3.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.4_1/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.39.3 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 14.6.1-arm64
CLT: 15.3.0.0.1.1708646388
Xcode: N/A
Rosetta 2: false

Output of brew tap

Nothing appears.
gonditeniz commented 2 months ago

Adding more details since I tried again just a couple of minutes ago. The first 2 attempts started downloading the package but failed at some point while the 3 one got stuck.

First attempt.

==> Downloading https://formulae.brew.sh/api/cask.jws.json
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --fail --remote-time --output /Users/gonditeniz/Library/Caches/Homebrew/api/cask.jws.json --location --time-cond /Users/gonditeniz/Library/Caches/Homebrew/api/cask.jws.json --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --fail --compressed --speed-limit 100 --speed-time 5 https://formulae.brew.sh/api/cask.jws.json
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1478k  100 1478k    0     0  2327k      0 --:--:-- --:--:-- --:--:-- 2327k
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex-no-gui
==> Cask::Installer#install
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading basictex
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex
==> Printing caveats
==> Caveats
You must restart your terminal window for the installation of MacTeX CLI
tools to take effect.

Alternatively, Bash and Zsh users can run the command:

  eval "$(/usr/libexec/path_helper)"

==> Cask::Installer#fetch
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
==> Downloading https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
==> Downloading from https://osl.ugr.es/CTAN/systems/mac/mactex/mactex-20240312.pkg
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --fail --retry 3 --remote-time --output /Users/gonditeniz/Library/Caches/Homebrew/downloads/b72126468948a67559755caf77f00be41e4985bf0541a5441c3630d82acbc360--mactex-20240312.pkg.incomplete --location https://osl.ugr.es/CTAN/systems/mac/mactex/mactex-20240312.pkg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 43 5768M   43 2499M    0     0  18.4M      0  0:05:12  0:02:15  0:02:57 12.1M
curl: (18) transfer closed with 3427771786 bytes remaining to read
Error: Download failed on Cask 'mactex-no-gui' with message: Download failed: https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
/opt/homebrew/Library/Homebrew/download_strategy.rb:434:in `rescue in fetch'
/opt/homebrew/Library/Homebrew/download_strategy.rb:431:in `fetch'
/opt/homebrew/Library/Homebrew/downloadable.rb:87:in `fetch'
/opt/homebrew/Library/Homebrew/cask/download.rb:53:in `fetch'
/opt/homebrew/Library/Homebrew/cask/installer.rb:193:in `download'
/opt/homebrew/Library/Homebrew/cask/installer.rb:74:in `fetch'
/opt/homebrew/Library/Homebrew/cask/installer.rb:104:in `install'
/opt/homebrew/Library/Homebrew/cmd/install.rb:246:in `block in run'
/opt/homebrew/Library/Homebrew/cmd/install.rb:235:in `each'
/opt/homebrew/Library/Homebrew/cmd/install.rb:235:in `run'
/opt/homebrew/Library/Homebrew/brew.rb:96:in `<main>'

Second attempt

brew install --verbose --debug --cask mactex-no-gui
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex-no-gui
==> Cask::Installer#install
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading basictex
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex
==> Printing caveats
==> Caveats
You must restart your terminal window for the installation of MacTeX CLI
tools to take effect.

Alternatively, Bash and Zsh users can run the command:

  eval "$(/usr/libexec/path_helper)"

==> Cask::Installer#fetch
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
==> Downloading https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
==> Downloading from https://osl.ugr.es/CTAN/systems/mac/mactex/mactex-20240312.pkg
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --location https://osl.ugr.es/CTAN/systems/mac/mactex/mactex-20240312.pkg
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --fail --retry 3 --remote-time --output /Users/gonditeniz/Library/Caches/Homebrew/downloads/b72126468948a67559755caf77f00be41e4985bf0541a5441c3630d82acbc360--mactex-20240312.pkg.incomplete --continue-at - --location https://osl.ugr.es/CTAN/systems/mac/mactex/mactex-20240312.pkg
** Resuming transfer from byte position 2620604416
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 76 3268M   76 2490M    0     0  20.0M      0  0:02:42  0:02:04  0:00:38 17.4M
curl: (18) transfer closed with 815850890 bytes remaining to read
Error: Download failed on Cask 'mactex-no-gui' with message: Download failed: https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
/opt/homebrew/Library/Homebrew/download_strategy.rb:434:in `rescue in fetch'
/opt/homebrew/Library/Homebrew/download_strategy.rb:431:in `fetch'
/opt/homebrew/Library/Homebrew/downloadable.rb:87:in `fetch'
/opt/homebrew/Library/Homebrew/cask/download.rb:53:in `fetch'
/opt/homebrew/Library/Homebrew/cask/installer.rb:193:in `download'
/opt/homebrew/Library/Homebrew/cask/installer.rb:74:in `fetch'
/opt/homebrew/Library/Homebrew/cask/installer.rb:104:in `install'
/opt/homebrew/Library/Homebrew/cmd/install.rb:246:in `block in run'
/opt/homebrew/Library/Homebrew/cmd/install.rb:235:in `each'
/opt/homebrew/Library/Homebrew/cmd/install.rb:235:in `run'
/opt/homebrew/Library/Homebrew/brew.rb:96:in `<main>'

Third attempt

brew install --verbose --debug --cask mactex-no-gui
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex-no-gui
==> Cask::Installer#install
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading basictex
/opt/homebrew/Library/Homebrew/brew.rb (Cask::CaskLoader::FromAPILoader): loading mactex
==> Printing caveats
==> Caveats
You must restart your terminal window for the installation of MacTeX CLI
tools to take effect.

Alternatively, Bash and Zsh users can run the command:

  eval "$(/usr/libexec/path_helper)"

==> Cask::Installer#fetch
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.3.15\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 14.6.1\)\ curl/8.7.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg

In the computer that is working the mirror is different: https://ctan.fisiquimicamente.com/systems/mac/mactex/mactex-20240312.pkg

SMillerDev commented 2 months ago

In the computer that is working the mirror is different: https://ctan.fisiquimicamente.com/systems/mac/mactex/mactex-20240312.pkg

The mirror redirection is done by mactex, as you can see in the output Homebrew receives a redirect:

==> Downloading https://mirror.ctan.org/systems/mac/mactex/mactex-20240312.pkg
==> Downloading from https://osl.ugr.es/CTAN/systems/mac/mactex/mactex-20240312.pkg

This means there is nothing Homebrew could do to fix your connection to the mirror.

khipp commented 2 months ago

If you have a working mirror, you can download the file manually and move it to the cache location before installing the cask (see documentation):

mv mactex-20240312.pkg "$(brew --cache --build-from-source mactex-no-gui)"