0

When trying to install R via Brew, I get the following output and errors:

==> Pouring pcre-8.43.mojave.bottle.tar.gz 
cp: /usr/local/Cellar/pcre/./8.43: 
cp: /var/folders/3l/zsdg6x9x61g8nhnb8f6pxzvw0000gn/T/d20190415-7574-1t8em0n/pcre/./8.43: unable to copy extended attributes to /usr/local/Cellar/pcre/./8.43: Permission denied
cp: /usr/local/Cellar/pcre/./8.43/INSTALL_RECEIPT.json: No such file or directory
cp: /usr/local/Cellar/pcre/./8.43/bin: No such file or directory

....

cp: utimes: /usr/local/Cellar/pcre/.: Operation not permitted
Error: Failure while executing; `cp -pR /var/folders/3l/zsdg6x9x61g8nhnb8f6pxzvw0000gn/T/d20190415-7574-1t8em0n/pcre/. /usr/local/Cellar/pcre` exited with 1. Here's the output:
cp: /usr/local/Cellar/pcre/./8.43: Permission denied
cp: /var/folders/3l/zsdg6x9x61g8nhnb8f6pxzvw0000gn/T/d20190415-7574-1t8em0n/pcre/./8.43: unable to copy extended attributes to /usr/local/Cellar/pcre/./8.43: Permission denied

....

Warning: Bottle installation failed: building from source.
Error: An exception occurred within a child process:
  Errno::EACCES: Permission denied @ dir_s_mkdir - /usr/local/Cellar/pcre/8.43

I'm installing this under an admin account. Via my normal non-admin account I get more trouble, and then have to chown many /usr/local folders, and don't think that's a good idea. Maybe for the brew-folders that is fine, but not for other stuff.

How can I install R and get it working?

1

Maybe it is a problem about permission. According to the logs given above, I think the key point is the permission of /usr/local/Cellar/ or the sub/parent directory. Checking the permission maybe help.

| improve this answer | |
  • I had to change the permission on the folder with this command: sudo chown -R ${USER}:staff /usr/local/Cellar/ because I had mix permissions from a previous bad Homebrew installation. I was on a Mac OS X (Mojave) – Edenshaw Jan 27 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.