Homebrew broken and unable to install anything - homebrew

~ % brew install curl
==> Downloading https://ghcr.io/v2/homebrew/core/brotli/manifests/1.0.9
Already downloaded: /Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json
Error: curl: Failed to download resource "brotli_bottle_manifest"
The downloaded GitHub Packages manifest was corrupted or modified (it is not valid JSON):
/Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json
My Homebrew is broken and is unable to install anything. A typical output is above

The problem was resolved after delete /Users/currentuser/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json
and run brew install curl again

It might be using the installed curl instead of system curl.
From man brew
set HOMEBREW_FORCE_BREWED_CURL

I have also this problem with brew install php
the problem persists even after deleting all the files from
/Users/currentuser/Library/Caches/Homebrew/downloads/
and
brew install php again
i have also tried
HOMEBREW_FORCE_BREWED_CURL=1 brew install openssl

This command fixed the issue for me:
brew cleanup

Related

Unistall error using home-brew -> error using brew prune

I have Paste installed and want to uninstall it, currently running macOS High Sierra.
I have tried using the $ brew uninstall Paste and it gets returned with Error: No such keg: /usr/local/Cellar/paste.
After that I used $ brew update of which everything is up-to-date.
So after that I used $ brew doctor which returned
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: Broken symlinks were found. Remove them with `brew prune`:
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuProN-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStd-W8
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuStdN-W8
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruPro-W4
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMaruProN-W4
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinPro-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraMinProN-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W3
/usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraginoSansGB-W6
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuGo-Bold
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuGo-Medium
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Demibold
/usr/local/share/ghostscript/9.16/Resource/CIDFont/YuMin-Medium
However, when I try and use $ brew prune I get returned with
Error: Permission denied # unlink_internal - /usr/local/share/ghostscript/9.16/Resource/CIDFont/HiraKakuPro-W3
Can anyone help with this issue?
Simply run:
brew uninstall paste
You're getting the error: No such keg: /usr/local/Cellar/pastewhenbrew uninstall Past because there are no brew formulae installed or in the official Homebrew repository named paste.
brew install paste
Error: No available formula with the name "paste"
I guess you've installed it using cask:
brew cask install paste
If you try to uninstall it using brew you'll get that error:
brew uninstall Paste
Error: No such keg: /usr/local/Cellar/paste
To uninstall paste simply use brew cask instead:
brew cask uninstall paste

Homebrew PHP5.6 memcached installation error

I'm trying to install the memcached extension for PHP 5.6 via Homebrew.
brew install php56-memcached
The error I get is
Error: No such file or directory - /usr/local/opt/igbinary/include/igbinary.h
I've tried reinstalling php56-igbinary and php56 itself. Neither fixes this problem. I tried to locate any files named igbinary.h and could not find any on the computer. How do I fix this?
You try remove and reinstall these pakage
brew remove php56-igbinary php56-memcached
brew reinstall php56 --enable-maintainer-zts --build-from-source php56-igbinary --build-from-source php56-memcached --build-from-source
Worked for me with php56-redis with the same error message.
brew reinstall --enable-maintainer-zts --build-from-source php56-redis
php56-igbinary is used from installation location when installing from source

Unable to install ImageMagick on Mac OS X El Capitan

I can't install ImageMagick on my Mac:
brew install ImageMagick
==> Downloading http://www.imagemagick.org/download/releases/ImageMagick-6.9.2-4.tar.xz
curl: (22) The requested URL returned error: 404 Not Found
Trying a mirror...
==> Downloading http://ftp.nluug.nl/ImageMagick/ImageMagick-6.9.2-4.tar.xz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "imagemagick"
Download failed: http://ftp.nluug.nl/ImageMagick/ImageMagick-6.9.2-4.tar.xz
After uninstalling brew and installing brew again this work fine thanks.
here is the command to install brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
You have an outdated Homebrew. Run brew update then try again; ImageMagick is known for changing their URLs very frequently and break the old ones; so if you haven’t updated brew for a long time you might get build failures.

Installing GDAL with Homebrew Error

I'm currently working through Let's make a map and I'm having difficulty installing GDAL. Here's the console output:
brew doctor
Your system is raring to brew.
Toms-MacBook-Pro:~ tomstove$ brew install gdal
==> Installing gdal dependency: sqlite
==> Downloading http://sqlite.org/2013/sqlite-autoconf-3071600.tar.gz
################################### 49.8%
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
Error: Download failed: http://sqlite.org/2013/sqlite-autoconf-3071600.tar.gz
I'm on a mac running Mountain Lion so sqlite should already be installed. Any help would be much appreciated.
Thanks,
Tom
http://sqlite.org/ doesn't support resume downloading.
Go to
cd /Library/Caches/Homebrew
or if you configurated other Location:
brew --cache
And delete all incomplete downloaded sqlite files (like rm sqlite*).
And then try
brew install sqlite
I had the same problem and was able to install by updating homebrew.
brew update
If you are have trouble running brew update, you probably need to fetch origin:
brew update: The following untracked working tree files would be overwritten by merge:

Error installing CouchDB with homebrew osx 10.8 - skip dependency?

So I tried to install it according to the directions on couchdb wiki. and I get the following issue
Installing couchdb dependency: erlang-r15
==> Downloading https://github.com/erlang/otp/archive/OTP_R15B03-1.tar.gz
Already downloaded: /Library/Caches/Homebrew/erlang-r15-R15B03-1.tar.gz
Error: SHA1 mismatch
Expected: 5ba866722de79956b06966c232490d32bb7ba0a6
Actual: 7843070f5d325f95ef13022fc416b22b6b14120d
Archive: /Library/Caches/Homebrew/erlang-r15-R15B03-1.tar.gz
Is there anyway to tell brew to skip this dependency since I have already installed the correct version of erlang, and it can't see it?
Did you try brew uninstall couchdb and re install after?
I had the same issue, it fixed it for me
So to get this working I followed the instruction on the couchdb until the install couchdb command:
brew remove --force openssl erlang couchdb icu4c spidermonkey nspr
brew update
brew outdated
brew rm --force erlang
cd /usr/local
git checkout 168742f Library/Formula/erlang.rb
brew install erlang
since I knew I had the right erlang installed I altered the Bew formula to make it work correctly.
So I headed over to the formula at
vim /usr/local/Library/Formula/couchdb.rb
And altered the dependency line
depends_on 'erlang-15'
to
depends_on 'erlang'
and works great now!!
None of the solutions here worked for me, but the below did. Note, I had to build with unixodbc.
brew remove --force openssl erlang couchdb icu4c spidermonkey
brew update
brew install unixodbc
brew install homebrew/versions/erlang-r15 --with-unixodbc
# edit /usr/local/Library/Formula/couchdb.rb to change depends_on to 'erlang-r15'
brew install couchdb
You may want to first try force removing only erlang and couchdb -- as someone in this thread mentioned that force removing packages messed up his system (though I did not encounter this problem when running the above instructions).

Resources