I tried repeatedly to upgrade python using the command brew upgrade python, and it failed, with the first five failure lines being:
./configure: /usr/local/Homebrew/Library/Homebrew/shims/super/sed: /bin/bash: bad interpreter: Operation not permitted
I attempted to uninstall and reinstall python to no effect except that now I have to run brew install python instead of brew upgrade python, and I had to uninstall vim and macvim. The first five lines of failure are still the above.
I have recorded a gist log to https://gist.github.com/dljessup/2bb32a77ce8183cde96b7feb0ca01d7d
I have attached the output from when I run the command brew install python as brew-upgrade-python.LOG.
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew installing one, specific Homebrew/homebrew-core formula (not cask or tap) and not every time you run brew? If it's a general brew problem please file this issue at https://github.com/Homebrew/brew/issues/new. If it's a brew cask problem please file this issue at https://github.com/Homebrew/caskroom/homebrew-cask/new. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update and retried your prior step?brew doctor, fixed all issues and retried your prior step?brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?To help us debug your issue please explain:
brew install commands)To get formulae added or changed in Homebrew please file a Pull Request
We will close issues requesting formulae changes.
Try updating XCode via the App Store, start it and install the additional components, as explained here: https://github.com/macvim-dev/macvim/issues/546#issuecomment-330986310.
Thank you @shoeffner. Unfortunately, that doesn't appear to be the problem; I am getting exactly the same failures now as before I updated XCode.
Same here, unfortunatelly!
I tried all sugestions. I opened xcode. It downloaded the extra components. I restarted my MacMini. Brew doctor. Double update.
I get the same error.
Mac Sierra softwareupdate -l tells me I am up to date.
Another possibility for getting these errors would be that one of the files involved (or directories, or drive) is marked as quarantined. Do you have a particular filesystem setup?
Note that I also ran into this problem while trying to install macvim with the options --with-override-system-vim.
@fxcoudert: I don't know what you're asking when you ask if I have a particular filesystem setup. I have the single SSD that came standard with my Macbook. If I run df, I have the following:
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1 487830528 122805768 364512760 26% 1555298 4293411981 0% /
devfs 370 370 0 100% 643 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
map -fstab 0 0 0 100% 0 0 100% /Network/Servers
Regarding quarantined files, I have looked to see if any of the involved files have the com.apple.quarantine extended attribute, and so far as I can tell, they do not.
What's the output of
git -C $(brew --repo) status
@ilovezfs:
On branch master
nothing to commit, working tree clean
And how about
HOMEBREW_ENV_FILTERING=1 brew install python
Hm, I get this
```--- ~ » brew upgrade 1 ↵
==> Upgrading 1 outdated package, with result:
macvim 8.0-138
==> Upgrading macvim --with-override-system-vim --with-lua --with-luajit
==> Downloading https://github.com/macvim-dev/macvim/archive/snapshot-138.tar.gz
Already downloaded: /Users/jrasanen/Library/Caches/Homebrew/macvim-8.0-138.tar.gz
==> ./configure --with-features=huge --enable-multibyte --with-macarchs=x86_64 --enable-perlinterp --enable-rubyinterp --enable-tclinterp --enable-terminal --with-tlib=ncurses --with-compiledby=Homebrew --with-local-dir=/usr/local --enabl
==> make
Last 15 lines from /Users/jrasanen/Library/Logs/Homebrew/macvim/02.make:
cd /tmp/macvim-20171005-88188-9fewzn/macvim-snapshot-138/src/MacVim
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks /tmp/macvim-20171005-88188-9fewzn/macvim-snapshot-138/src/MacVim/icons/MacVim.icns /tmp/macvim-20171005-88188-9fewzn/macvim-snapshot-138/src/MacVim/build/Release/MacVim.app/Contents/Resources
CopyPlistFile build/Release/MacVim.app/Contents/Resources/KeyBinding.plist KeyBinding.plist
cd /tmp/macvim-20171005-88188-9fewzn/macvim-snapshot-138/src/MacVim
builtin-copyPlist --outdir /tmp/macvim-20171005-88188-9fewzn/macvim-snapshot-138/src/MacVim/build/Release/MacVim.app/Contents/Resources -- KeyBinding.plist
* BUILD FAILED *
The following build commands failed:
StripNIB English.lproj/FindAndReplace.nib
(1 failure)
make[1]: * [macvim] Error 65
make: * [first] Error 2
READ THIS: https://docs.brew.sh/Troubleshooting.html
These open issues may also help:
Attempting to upgrade/install python(2) is failing with “Bad interpreter: operation not permitted” https://github.com/Homebrew/homebrew-core/issues/18816```
A little bit of further research:
/usr/local/Homebrew/Library/Homebrew/shims/super/sed is a shellscript which finagles with some environment variables and calls /usr/bin/sed. The first line was a shebang:
#!/bin/bash
By changing this to /bin/sh, I verified that it was this shebang line that was being rejected with “operation not permitted”.
However, when I tried to do some more testing this morning, I stopped getting the “Operation not permitted” errors and instead getting
configure: error: in `/private/tmp/python-20171006-21003-18wm7zp/Python-2.7.14':
configure: error: C compiler cannot create executables
I'm going to go ahead and close this issue because the install, while still not working, is now breaking at a different, later place.
For those who are still trying to figure this out, this might be related to #19191. In my case, I fixed it by opening XCode and clicking "Install additional components" when prompted.
Most helpful comment
Try updating XCode via the App Store, start it and install the additional components, as explained here: https://github.com/macvim-dev/macvim/issues/546#issuecomment-330986310.