Homebrew permission denied on file I own with rwx permissions - macos

I have a 2016 MacBook Pro (w/ touchbar) and Mac OS Sierra (10.12.3). I freshly installed Homebrew (v1.1.9) and ran brew install gcc49. It appears to install all dependencies fine, but once it gets to gcc, I get
Error: Permission denied - /Users/<me>/Library/Caches/Homebrew/gcc#4.9-4.9.3.tar.bz2
Original permissions after downloaded by Homebrew:
-rw-r--r-- 1 <me> <company_domain> 86M Jun 26 2015 /Users/<me>/Library/Caches/Homebrew/gcc#4.9-4.9.3.tar.bz2
I tried setting to 755 and group to admin, but no luck:
-rwxr-xr-x 1 <me> admin 86M Jun 26 2015 /Users/<me>/Library/Caches/Homebrew/gcc#4.9-4.9.3.tar.bz2
> brew install gcc49
Updating Homebrew...
==> Using the sandbox
==> Downloading https://ftpmirror.gnu.org/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
Already downloaded: /Users/<me>/Library/Caches/Homebrew/gcc#4.9-4.9.3.tar.bz2
Error: Permission denied - /Users/<me>/Library/Caches/Homebrew/gcc#4.9-4.9.3.tar.bz2
I then chowned the directory to be group admin instead of the company domain. It already had 775 permissions. Still no luck.
I have seen several posts where people had to chown directories to make homebrew happy, but I don't see permission issues on the given file or directory.
brew doctor reports some unexpected dylibs, header, and .pc files. I'm not sure if those came from my company's Mac OS image.
Am I overlooking something obvious? I appreciate any help.
Here is the entire initial install output:
> brew install gcc49
==> Installing dependencies for gcc#4.9: gmp#4, mpfr#2, libmpc#0.8, isl#0.12, cloog
==> Installing gcc#4.9 dependency: gmp#4
==> Downloading https://homebrew.bintray.com/bottles/gmp#4-4.3.2.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring gmp#4-4.3.2.sierra.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/gmp#4/lib
CPPFLAGS: -I/usr/local/opt/gmp#4/include
==> Summary
🍺 /usr/local/Cellar/gmp#4/4.3.2: 20 files, 2.4M
==> Installing gcc#4.9 dependency: mpfr#2
==> Downloading https://homebrew.bintray.com/bottles/mpfr#2-2.4.2.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring mpfr#2-2.4.2.sierra.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/mpfr#2/lib
CPPFLAGS: -I/usr/local/opt/mpfr#2/include
==> Summary
🍺 /usr/local/Cellar/mpfr#2/2.4.2: 25 files, 2.7M
==> Installing gcc#4.9 dependency: libmpc#0.8
==> Downloading https://homebrew.bintray.com/bottles/libmpc#0.8-0.8.1.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring libmpc#0.8-0.8.1.sierra.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/libmpc#0.8/lib
CPPFLAGS: -I/usr/local/opt/libmpc#0.8/include
==> Summary
🍺 /usr/local/Cellar/libmpc#0.8/0.8.1: 12 files, 273.8K
==> Installing gcc#4.9 dependency: isl#0.12
==> Downloading https://homebrew.bintray.com/bottles/isl#0.12-0.12.2.sierra.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring isl#0.12-0.12.2.sierra.bottle.1.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
This is an alternate version of another formula.
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/isl#0.12/lib
CPPFLAGS: -I/usr/local/opt/isl#0.12/include
==> Summary
🍺 /usr/local/Cellar/isl#0.12/0.12.2: 57 files, 2.9M
==> Installing gcc#4.9 dependency: cloog
==> Downloading https://homebrew.bintray.com/bottles/cloog-0.18.4_1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring cloog-0.18.4_1.sierra.bottle.tar.gz
🍺 /usr/local/Cellar/cloog/0.18.4_1: 35 files, 442.4K
==> Installing gcc#4.9
==> Using the sandbox
==> Downloading https://ftpmirror.gnu.org/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
==> Downloading from http://mirror.easthsia.com/gnu/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
######################################################################## 100.0%
Error: Permission denied - /Users/<me>/Library/Caches/Homebrew/gcc#4.9-4.9.3.tar.bz2

Try to sudo chown -R <me>:admin /usr/local/* and try again. You may need to restore some user or group ownership recursively (which this command will do).

Related

Ruby Version Failure 2.7.0: Error: Permission denied # apply2files - /usr/local/share/Library/

As the title states, when I try install Ruby version 2.7.0 with rvm install ruby-2.7.0, I get the following output:
Ruby Version Failure 2.7.0: Error: Permission denied # apply2files - /usr/local/share/Library/Caches/Yarn/v6/npm-micromatch-3.1.10-70859bc95c9840952f359a068a3fc49f9ecfac23-integrity/node_modules/micromatch/lib/.DS_Stor
The full output is below:
==> Upgrading 3 outdated packages:
libtool 2.4.6_1 -> 2.4.6_2
libyaml 0.2.2 -> 0.2.5
pkg-config 0.29.2_2 -> 0.29.2_3
==> Upgrading libtool 2.4.6_1 -> 2.4.6_2
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_2.catalina.bottle.tar.gz
==> Downloading from https://d29vzk4ow07wi7.cloudfront.net/af317b35d0a394b7ef55fba4950735b0392d9f31bececebf9c412261c23a01fc?response-content-disposition=attachment%3Bfilename%3D%22libtool-2.4.6_2.catalina.b
######################################################################## 100.0%
==> Pouring libtool-2.4.6_2.catalina.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
🍺 /usr/local/Cellar/libtool/2.4.6_2: 71 files, 3.7MB
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /usr/local/Cellar/libtool/2.4.6_1... (71 files, 3.7MB)
Error: Permission denied # apply2files - /usr/local/share/Library/Caches/Yarn/v6/npm-micromatch-3.1.10-70859bc95c9840952f359a068a3fc49f9ecfac23-integrity/node_modules/micromatch/lib/.DS_Store
This is unrelated to rvm itself. To install required dependencies for your ruby, rvm used your installed homebrew. However, during cleanup of your installed bottles, homebrew encounters an error, possible because you one installed things with sudo previously.
Try brew doctor and follow its advice to fix your homebrew setup.

I cannot get solidity installed with homebrew on macOS Sierra. Installation hangs at boost

I have tried to install solidity on my Mac with
brew update
brew upgrade
brew tap ethereum/ethereum
brew install solidity
brew linkapps solidity
as suggested at solidity#binary-packages. But when I try to brew install solidity the installation process gets stuck right here when installing boost:
bash-3.2$ brew install solidity
==> Installing solidity from ethereum/ethereum
==> Installing dependencies for ethereum/ethereum/solidity: boost, cryptopp, gmp
==> Installing ethereum/ethereum/solidity dependency: boost
==> Using the sandbox
==> Downloading https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.bz2
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost-1.64.0.tar.bz2
==> Downloading https://github.com/boostorg/mpi/commit/f5bdcc1.patch
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost--patch-c7af75a83fef90fdb9858bc988d64ca569ae8d940396b9bc60a57d63fca2587b.patch
==> Downloading https://github.com/boostorg/serialization/commit/1d86261.diff
Already downloaded: /Users/Me/Library/Caches/Homebrew/boost--patch-155f603a00975a1702808be072c1420964feac8323de39c111a9d3a363a4ed9a.diff
==> Patching
==> Applying f5bdcc1.patch
patching file boost/mpi/detail/mpi_datatype_primitive.hpp
patching file boost/mpi/detail/packed_iprimitive.hpp
patching file boost/mpi/detail/packed_oprimitive.hpp
Hunk #2 succeeded at 97 (offset -5 lines).
==> Applying 1d86261.diff
patching file boost/serialization/array.hpp
==> ./bootstrap.sh --prefix=/usr/local/Cellar/boost/1.64.0_1 --libdir=/usr/local/Cellar/boost/1.64.0_1/lib --without-icu --without-libraries=python,mp
==> ./b2 headers
==> ./b2 --prefix=/usr/local/Cellar/boost/1.64.0_1 --libdir=/usr/local/Cellar/boost/1.64.0_1/lib -d2 -j4 --layout=tagged --user-config=user-config.jam
I did find this brew hanging thread and tried to fix everything brew doctor gave me and I have the latest command line tools installed. I could not get it to work yet. Any ideas?
JK! Wow. I guess one of the manny things I tried must have worked. Now it still takes a very very long time but eventually it came to:
🍺 /usr/local/Cellar/boost/1.64.0_1: 12,630 files, 404.4MB, built in 17 minutes 38 seconds
17minutes. Wow.

Error: inreplace failed while installling with homebrew?

I would like to install treetagger in OS X. In order to make it easier I tried to search if this is possible with Homebrew. So I look at the web and found this formula from pepijnkokke user. Next, I tried to install treetagger as follows:
user#MacBook-Pro-User-2:~$ brew install /Users/user/Downloads/tree-tagger.rb
However, I got the following error:
==> Installing dependencies for tree-tagger: openssl, wget
==> Installing tree-tagger dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2g.el_capitan.
######################################################################## 100.0%
==> Pouring openssl-1.0.2g.el_capitan.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl/certs
and run
/usr/local/opt/openssl/bin/c_rehash
This formula is keg-only, which means it was not symlinked into /usr/local.
Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2g: 1,678 files, 12.0M
==> Installing tree-tagger dependency: wget
==> Downloading https://homebrew.bintray.com/bottles/wget-1.17.1.el_capitan.bot
######################################################################## 100.0%
==> Pouring wget-1.17.1.el_capitan.bottle.1.tar.gz
🍺 /usr/local/Cellar/wget/1.17.1: 9 files, 1.5M
==> Installing tree-tagger
==> Downloading http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tr
######################################################################## 100.0%
Warning: SHA1 support is deprecated and will be removed in a future version.
Please switch this formula to SHA256.
Error: SHA1 mismatch
Expected: d823320b718eb41a5b4fef449a711307caaf0d88
Actual: 340e09912101acd996642eeed8f623315fa6d672
Archive: /Library/Caches/Homebrew/tree-tagger-3.2.tar.gz
To retry an incomplete download, remove the file above.
I removed the above file and the sha line (sha1 "d823320b718eb41a5b4fef449a711307caaf0d88") and tried again. Nevertheless I got this:
user#MacBook-Pro-de-User-2:~$ brew install /Users/user/Downloads/tree-tagger.rb==> Downloading http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tr
######################################################################## 100.0%
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/tagger-sc
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/english-p
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/english-c
==> wget http://www.cis.uni-muenchen.de/~schmid/tools/TreeTagger/data/install-t
==> chmod +x ./install-tagger.sh
==> ./install-tagger.sh
Error: inreplace failed
cmd/chunker-read-lemma.perl:
expected replacement of /BIN=.*/ with "BIN=/usr/local/Cellar/tree-tagger/3.2/libexec/bin"
expected replacement of /CMD=.*/ with "CMD=/usr/local/Cellar/tree-tagger/3.2/libexec/cmd"
expected replacement of /LIB=.*/ with "LIB=/usr/local/Cellar/tree-tagger/3.2/libexec/lib"
Any idea of how to install treetagger with homebrew?.
Have you tried installing openssl via homebrew?
brew install openssl
brew link openssl --force
brew install treehugger
Why don't you just install it the normal way as mentioned in the document?
The following steps are necessary to install the TreeTagger (see below for the Windows version). Download the files by right-clicking on the link. Then select "save file as". All files should be stored in the same directory.
Download the tagger package for your system (PC-Linux, Mac OS-X
(Intel-CPU), PC-Linux (version for older kernels)).
Download the tagging scripts into the same directory.
Download the installation script install-tagger.sh.
Download the parameter files for the languages you want to process.
Open a terminal window and run the installation script in the
directory where you have downloaded the files:
sh install-tagger.sh
Make a test, e.g. echo 'Hello world!' | cmd/tree-tagger-english
You might want to add ~/homebrew-compling/cmd and ~/homebrew-compling/bin to the PATH variable so that you do not need to specify the full path to run the tagging scripts.
This worked for me fine!

Homebrew: dpkg is not configured to install software

After running brew install dpkg, dpkg is successfully installed; but, like homebrew says below, cannot install or uninstall any software.
==> Caveats
This installation of dpkg is not configured to install software, so
commands such as `dpkg -i`, `dpkg --configure` will fail.
Full installation output:
MacBook-Air:~ james$ brew install dpkg
==> Installing dependencies for dpkg: gnu-tar, xz
==> Installing dpkg dependency: gnu-tar
==> Downloading https://homebrew.bintray.com/bottles/gnu-tar-1.28.yosemite.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring gnu-tar-1.28.yosemite.bottle.2.tar.gz
==> Caveats
gnu-tar has been installed as "gtar".
If you really need to use it as "tar", you can add a "gnubin" directory
to your PATH from your bashrc like:
PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"
==> Summary
🍺 /usr/local/Cellar/gnu-tar/1.28: 13 files, 1.6M
==> Installing dpkg dependency: xz
==> Downloading https://homebrew.bintray.com/bottles/xz-5.2.1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring xz-5.2.1.yosemite.bottle.tar.gz
🍺 /usr/local/Cellar/xz/5.2.1: 59 files, 1.7M
==> Installing dpkg
==> Downloading https://homebrew.bintray.com/bottles/dpkg-1.17.25_1.yosemite.bottle.tar.gz
######################################################################## 100.0%
==> Pouring dpkg-1.17.25_1.yosemite.bottle.tar.gz
==> Caveats
This installation of dpkg is not configured to install software, so
commands such as `dpkg -i`, `dpkg --configure` will fail.
==> Summary
🍺 /usr/local/Cellar/dpkg/1.17.25_1: 246 files, 5.3M

Cant install php53 on OS X Mavericks using homebew

I'm trying to install php53-fpm on OS X Mavericks
brew install php53 --with-fpm
Getting stacked at :
==> Installing dependencies for php53: gettext, jpeg, unixodbc, homebrew/dupes/zlib, libevent
==> Installing php53 dependency: gettext
==> Downloading http://ftpmirror.gnu.org/gettext/gettext-0.18.3.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/gettext-0.18.3.1.tar.gz
==> Downloading patches
######################################################################## 100.0%
==> Patching
patching file gettext-tools/Makefile.in
Hunk #1 succeeded at 1551 (offset 51 lines).
==> ./configure --prefix=/usr/local/Cellar/gettext/0.18.3.1 --with-included-gettext --with-included-glib --with-included-libcroco --with-included-libunistring --with-emacs --disa
==> make
Seems like this file of 16M will compile forever. I stopped after 2 hours. Any Idea ?
Thanks.
Upgrading xcode from the Appstore solved it somehow.

Resources