Brew install <package> fails on some packages in mojave but not all


(Kalima32) #1

I am new to the forum so if I’ve overlooked a step I apologize. I wanted to see if this behavior is occurring to other users before I submit a bug. Basically brew install works on some packages but not all, and seems to hang in perpetuity at the cp -pR steps on those packages were it fails. I will provide an example below so others can repo or not.

I have also updated the security setting in mojave to allow full disk access to the terminal app.

I have seen this error with the following packages so far:

python@2
gettext
spinx-docs

Here’s an example of a successful brew install on the same terminal:

my-computer:~ myaccount$ brew install pkg-config
==> Downloading URL:homebrew.bintray.com/bottles/pkg-config-0.29.2.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring pkg-config-0.29.2.mojave.bottle.tar.gz
:beer: /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627.2KB

Here’s an example of the error:

my-computer:Homebrew myaccount$ brew install --verbose --debug gettext
Updating Homebrew…
==> Auto-updated Homebrew!
Updated Homebrew from a1fa3b776 to 30c90dcc3.
No changes to formulae.

/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gettext.rb
==> Downloading URL:homebrew.bintray.com/bottles/gettext-0.19.8.1.mojave.bottle.tar.gz
/usr/bin/cURL: -q --show-error --user-agent Homebrew/1.8.4\ (Macintosh;\ Intel\ Mac\ OS\ X\ 10.14.1)\ cURL:/7.54.0 --location --silent --head URL:homebrew.bintray.com/bottles/gettext-0.19.8.1.mojave.bottle.tar.gz
Already downloaded: /Users/myaccount/Library/Caches/Homebrew/downloads/20fb183d8882abab5874937646456a6d73fcd3510ec65a0b2a54fdfeb0174519–gettext-0.19.8.1.mojave.bottle.tar.gz
==> Verifying 20fb183d8882abab5874937646456a6d73fcd3510ec65a0b2a54fdfeb0174519–gettext-0.19.8.1.mojave.bottle.tar.gz checksum
==> Pouring gettext-0.19.8.1.mojave.bottle.tar.gz
tar xf /Users/myaccount/Library/Caches/Homebrew/downloads/20fb183d8882abab5874937646456a6d73fcd3510ec65a0b2a54fdfeb0174519–gettext-0.19.8.1.mojave.bottle.tar.gz -C /var/folders/4y/sxn9f4597r37sbhrb2hz37r00000gn/T/d20181129-59267-1793a2l
cp -pR /var/folders/4y/sxn9f4597r37sbhrb2hz37r00000gn/T/d20181129-59267-1793a2l/gettext/. /usr/local/Cellar/gettext

Here’s my environment:

my-computer:Homebrew myaccount$ brew update
Already up-to-date.
my-computer:Homebrew myaccount$ brew update
Already up-to-date.
my-computer:Homebrew myaccount$ brew doctor --debug
Checking check_access_directories
Checking check_brew_git_origin
Checking check_build_from_source
Checking check_clt_minimum_version
Checking check_clt_up_to_date
Checking check_coretap_git_origin
Checking check_exist_directories
Checking check_filesystem_case_sensitive
Checking check_for_anaconda
Checking check_for_bad_cURL:
Checking check_for_bad_python_symlink
Checking check_for_beta_xquartz
Checking check_for_config_scripts
Checking check_for_external_cmd_name_conflict
Checking check_for_gettext
Checking check_for_git
Checking check_for_iconv
Checking check_for_installed_developer_tools
Checking check_for_multiple_volumes
Checking check_for_non_prefixed_coreutils
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb
Checking check_for_non_prefixed_findutils
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/findutils.rb
Checking check_for_other_frameworks
Checking check_for_other_package_managers
Checking check_for_pydistutils_cfg_in_home
Checking check_for_stray_dylibs
Checking check_for_stray_headers
Checking check_for_stray_las
Checking check_for_stray_pcs
Checking check_for_stray_static_libs
Checking check_for_symlinked_cellar
Checking check_for_tap_ruby_files_locations
Checking check_for_unlinked_but_not_keg_only
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/readline.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/sqlite.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openssl.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/ruby.rb
Checking check_for_unsupported_macos
Checking check_git_newline_settings
Checking check_git_status
Checking check_git_version
Checking check_homebrew_prefix
Checking check_if_xcode_needs_clt_installed
Checking check_ld_vars
Checking check_multiple_cellars
Checking check_ruby_version
Checking check_tmpdir
Checking check_tmpdir_sticky_bit
Checking check_user_path_1
Checking check_user_path_2
Checking check_user_path_3
Checking check_xcode_license_approved
Checking check_xcode_minimum_version
Checking check_xcode_prefix
Checking check_xcode_prefix_exists
Checking check_xcode_select_path
Checking check_xcode_up_to_date
Checking check_xquartz_up_to_date
Checking check_for_broken_symlinks
Checking check_missing_deps
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pkg-config.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gdbm.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/libyaml.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/perl.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/lua@5.1.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/luarocks.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/trash.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/xz.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/lua.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pcre.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jpeg.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/nmap.rb
Your system is ready to brew.
my-computer:Homebrew myaccount$ xcodebuild -version
Xcode 10.1
Build version 10B61
my-computer:Homebrew myaccount$ xcode-select --version
xcode-select version 2354.
my-computer:Homebrew myaccount$ brew gist-logs gettext
Error: No logs.
my-computer:Homebrew myaccount$ brew config
HOMEBREW_VERSION: 1.8.4
ORIGIN: URL:github.com/Homebrew/brew
HEAD: 2063a8a4d849b00f279ee2dd26e9f38745382ffc
Last commit: 5 days ago
Core tap ORIGIN: URL:github.com/Homebrew/homebrew-core
Core tap HEAD: 7a2655bf1b5f515bb9d6ee50d02c4d28b5ce3ea2
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.2 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
CURL:: 7.54.0 => /usr/bin/cURL:
Java: 1.8.0_191
macOS: 10.14.1-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: 10.1
CLT headers: 10.1.0.0.1.1539992718

Note: I have to remove the markup for URL’s because I’m a new member and it wouldn’t let me post.


(Sean Molenaar) #2

What happens if you run brew cleanup before a breaking install?


(Kalima32) #3

Unfortunately the same behavior. I tried that also once before.

my-computer:Homebrew myaccount$ brew cleanup
Removing: /usr/local/Cellar/openssl/1.0.2p… (1,793 files, 12MB)
Removing: /Users/myaccount/Library/Caches/Homebrew/openssl–1.0.2p.mojave.bottle.tar.gz… (3.7MB)
Removing: /Users/myaccount/Library/Caches/Homebrew/python–3.7.1.mojave.bottle.tar.gz… (14.4MB)
Warning: Skipping (old) /usr/local/Cellar/vim/8.1.0500 due to it being linked
Removing: /Users/myaccount/Library/Caches/Homebrew/vim–8.1.0500.mojave.bottle.tar.gz… (8MB)
Removing: /Users/myaccount/Library/Caches/Homebrew/Cask/atom–1.32.2.zip… (278.0MB)
Removing: /Users/myaccount/Library/Logs/Homebrew/gdbm… (64B)
Removing: /Users/myaccount/Library/Logs/Homebrew/python… (3 files, 131.8KB)
Removing: /Users/myaccount/Library/Logs/Homebrew/libyaml… (64B)
Removing: /Users/myaccount/Library/Logs/Homebrew/perl… (64B)
Removing: /Users/myaccount/Library/Logs/Homebrew/readline… (64B)
Removing: /Users/myaccount/Library/Logs/Homebrew/sqlite… (64B)
Removing: /Users/myaccount/Library/Logs/Homebrew/xz… (64B)
Removing: /Users/myaccount/Library/Logs/Homebrew/nmap… (64B)
Removing: /Users/myaccount/Library/Logs/Homebrew/openssl… (64B)
Removing: /Users/myaccount/Library/Logs/Homebrew/ruby… (64B)
==> This operation has freed approximately 316.4MB of disk space.

my-computer:Homebrew myacount$ brew install python@2 --verbose --debug
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python@2.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/pkg-config.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/sphinx-doc.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gdbm.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/openssl.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/readline.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/sqlite.rb
==> Downloading URL://homebrew.bintray.com/bottles/python@2-2.7.15_1.mojave.bottle.7.tar.gz
/usr/bin/curl -q --show-error --user-agent Homebrew/1.8.4-13-g5758c93\ (Macintosh;\ Intel\ Mac\ OS\ X\ 10.14.1)\ curl/7.54.0 --location --silent --head URL://homebrew.bintray.com/bottles/python@2-2.7.15_1.mojave.bottle.7.tar.gz
Already downloaded: /Users/myaccount/Library/Caches/Homebrew/downloads/016463f0b8bcbc2576d4d3923837f93633670a0fcd3c6f547bd5117860ba9360–python@2-2.7.15_1.mojave.bottle.7.tar.gz
==> Verifying 016463f0b8bcbc2576d4d3923837f93633670a0fcd3c6f547bd5117860ba9360–python@2-2.7.15_1.mojave.bottle.7.tar.gz checksum
==> Pouring python@2-2.7.15_1.mojave.bottle.7.tar.gz
tar xf /Users/myaccount/Library/Caches/Homebrew/downloads/016463f0b8bcbc2576d4d3923837f93633670a0fcd3c6f547bd5117860ba9360–python@2-2.7.15_1.mojave.bottle.7.tar.gz -C /var/folders/4y/sxn9f4597r37sbhrb2hz37r00000gn/T/d20181130-70449-e927pj
cp -pR /var/folders/4y/sxn9f4597r37sbhrb2hz37r00000gn/T/d20181130-70449-e927pj/python@2/. /usr/local/Cellar/python@2


#4

I fear I may have the same problem on Mojave 10.14.2, with a very simple install of Midnight Commander (mc)

This is what I get:

$ brew install mc
==> Downloading https://homebrew.bintray.com/bottles/midnight-commander-4.8.21.mojave.bottle.1.tar.gz
Already downloaded: /Users/mine/Library/Caches/Homebrew/downloads/270f667d8e438fb0bf687c6c3b48aa0b773bc3784b5d67c502e42b28bf8a93af–midnight-commander-4.8.21.mojave.bottle.1.tar.gz
==> Pouring midnight-commander-4.8.21.mojave.bottle.1.tar.gz
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/man/es/man1/mc.1
/usr/local/share/man/es/man1 is not writable.

You can try again using:
brew link midnight-commander

Predictably, the suggested link command just returns the same result:

$ brew link mc
Linking /usr/local/Cellar/midnight-commander/4.8.21…
Error: Could not symlink share/man/es/man1/mc.1
/usr/local/share/man/es/man1 is not writable.

I suspect it’s a permission issue, but I have no idea how to solve this (not an expert :wink:). brew sensibly does not allow anything to run with root privileges, but it appears some adjustment is needed at that level somewhere as Apple continues to make things safer…
Both Terminal and iTerm are set to have full disk access.


(Sean Molenaar) #5

what does ls -al /usr/local/share/man/es/man1 say?


#6

See below (I have very little installed :wink: ):

$ ls -al /usr/local/share/man/es/man1
total 320
drwxr-xr-x 3 root wheel 96 Nov 22 10:25 ./
drwxr-xr-x 3 root wheel 96 Mar 17 2018 …/
-rw-r–r-- 1 root wheel 159824 Mar 17 2018 nmap.1

More:

$ ls -al /usr/local/share/man/es
total 0
drwxr-xr-x 3 root wheel 96 Mar 17 2018 ./
drwxr-xr-x 20 mine admin 640 Dec 13 00:36 …/
drwxr-xr-x 3 root wheel 96 Nov 22 10:25 man1/

From the looks of it, the rights are 755 throughout the whole man page tree. Before I confuse things, nmap was NOT installed via brew, I tend to use their direct installers. Basically, mc was my first return to brew :slight_smile:


(Sean Molenaar) #7

I think the nmap installer broke the folder settings here.
From https://docs.brew.sh/Troubleshooting under “Common issues” you can run cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var opt Cellar Caskroom Frameworks


#8

Argh - how did I miss a so clearly labelled Troubleshooting page? Mea culpa - all OK now, even though brew doctor picked up an unexpected dylib:

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn’t put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libopenh264-1.4.0-osx64.dylib

I don’t know what put it there, but I suspect it’s either something related to ffmpeg or VLC, I can’t think of any other reason why it would be there. I’ve moved it away from there - if nothing breaks I’ll zap it, otherwise I’ll simply reinstate it.

Don’t know about the originator of the thread, but for me the issue is closed. Thank you kindly for your time.


(Kalima32) #9

I have attempted the user permission correction and still have the problem with some packages. I noticed a bug report on homebrew-core (https://github.com/Homebrew/homebrew-core/issues/33409) that got closed for lack of information. Guess I’m going to have to figure out how to reopen. Still testing…