cp: utimes: /usr/local/Cellar/node/.: Operation not permitted


(Kliere) #1

Hi there,

just recently, every upgrade of homebrew bottles (not installs) results in the following error (e.g. node):

==> Upgrading node

==> Downloading homebrew.bintray.com/bottles/node-10.10.0.sierra.bottle.tar.gz

==> Downloading from akamai.bintray.com/ca/ca520408b75b7a402576d43a90702c435aa03b18a0e22a05b671528437459bf3?gda=exp=1536313825~hmac=27532d02ac5340f24b1e72b0c217b4d070

######################################################################## 100.0%

==> Pouring node-10.10.0.sierra.bottle.tar.gz

cp: utimes: /usr/local/Cellar/node/.: Operation not permitted

Error: Failure while executing; cp -pR /var/folders/bh/s0yb0lmr8xj4n700r6_lk8b00000gn/T/d20180907-53287-sv901i/node/. /usr/local/Cellar/node exited with 1. Here’s the output:

cp: utimes: /usr/local/Cellar/node/.: Operation not permitted

Warning: Bottle installation failed: building from source.

Building from source is then going (mostly) fine.

Any idea how to fix this?

Already tried reinstalling homebrew, and the solution posted here:


to no avail.

Brew config:
HOMEBREW_VERSION: 1.7.3-31-gf2cb0da
ORIGIN: github.com/Homebrew/brew
HEAD: f2cb0da3b2a90b07878907daae5aa0ade2c0a4af
Last commit: 2 days ago
Core tap ORIGIN:github.com/Homebrew/homebrew-core
Core tap HEAD: 6ca78aa85cfbf18ff03d2382b1c78436827cafd1
Core tap last commit: 46 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GIT: git
CPU: 24-core 64-bit arrandale
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 9.0 build 900
Git: 2.18.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_161, 1.6.0_65-b14-468
macOS: 10.12.6-x86_64
CLT: 9.2.0.0.1.1510905681
Xcode: 9.2
XQuartz: 2.7.11 => /opt/X11

Thanks for listening,

Karsten


(Sean Molenaar) #2

what does ls -al /usr/local/Cellar/node say?


(Kliere) #3

drwxr-xr-x+ 4 root wheel 136 Sep 7 11:38 .
drwxr-xr-x+ 210 root wheel 7140 Sep 6 15:18 …
drwxr-xr-x 14 karsten wheel 476 Sep 7 11:44 10.10.0
drwxr-xr-x+ 14 root wheel 476 Aug 22 10:39 10.9.0


(Sean Molenaar) #4

yeah, you ran something as root relating to node and it’s now the owner. sudo chown -R $(whoami):wheel /usr/local


(Kliere) #5

Oh dear, thought I’d done that already. Well, thank you! Did the trick.

Best wishes,

Karsten