Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

brew upgrade is failing: Error: Failed to download resource "gettext" #43154

Closed
mikesmayer opened this issue Aug 21, 2015 · 25 comments
Closed

brew upgrade is failing: Error: Failed to download resource "gettext" #43154

mikesmayer opened this issue Aug 21, 2015 · 25 comments
Assignees

Comments

@mikesmayer
Copy link

I'm getting a strange error when brew tries to download packages:

$ brew upgrade
==> Upgrading 12 outdated packages, with result:
gettext 0.19.5.1, git 2.5.0, go 1.5, harfbuzz 1.0.1, heroku-toolbelt 3.41.3, imagemagick 6.9.1-10, libpng 1.6.18, mercurial 3.5, openssl 1.0.2d_1, python 2.7.10_2, redis 3.0.3, sqlite 3.8.11.1
==> Upgrading gettext
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.5.1.yosemite.bottle.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "gettext"
Download failed: https://homebrew.bintray.com/bottles/gettext-0.19.5.1.yosemite.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading http://ftpmirror.gnu.org/gettext/gettext-0.19.5.1.tar.xz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Trying a mirror...
==> Downloading https://ftp.gnu.org/gnu/gettext/gettext-0.19.5.1.tar.xz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "gettext"
Download failed: https://ftp.gnu.org/gnu/gettext/gettext-0.19.5.1.tar.xz
==> Upgrading git
==> Downloading https://homebrew.bintray.com/bottles/git-2.5.0.yosemite.bottle.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "git"
Download failed: https://homebrew.bintray.com/bottles/git-2.5.0.yosemite.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.5.0.tar.xz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "git"
Download failed: https://www.kernel.org/pub/software/scm/git/git-2.5.0.tar.xz
==> Upgrading go
==> Downloading https://homebrew.bintray.com/bottles/go-1.5.yosemite.bottle.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "go"
Download failed: https://homebrew.bintray.com/bottles/go-1.5.yosemite.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://storage.googleapis.com/golang/go1.5.src.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Trying a mirror...
==> Downloading https://fossies.org/linux/misc/go1.5.src.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "go"
Download failed: https://fossies.org/linux/misc/go1.5.src.tar.gz
==> Upgrading harfbuzz
==> Installing dependencies for harfbuzz: gettext, libpng
==> Upgrading heroku-toolbelt
==> Downloading https://s3.amazonaws.com/assets.heroku.com/heroku-client/heroku-client-3.41.3.tgz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "heroku-toolbelt"
Download failed: https://s3.amazonaws.com/assets.heroku.com/heroku-client/heroku-client-3.41.3.tgz
==> Upgrading imagemagick
==> Installing imagemagick dependency: libpng
==> Downloading https://homebrew.bintray.com/bottles/libpng-1.6.18.yosemite.bottle.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "libpng"
Download failed: https://homebrew.bintray.com/bottles/libpng-1.6.18.yosemite.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.18.tar.xz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Trying a mirror...
==> Downloading https://dl.bintray.com/homebrew/mirror/libpng-1.6.18.tar.xz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "libpng"
Download failed: https://dl.bintray.com/homebrew/mirror/libpng-1.6.18.tar.xz
==> Upgrading mercurial
==> Installing mercurial dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "openssl"
Download failed: https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz
Warning: Bottle installation failed: building from source.
Error: /usr/local/opt/makedepend not present or broken
Please reinstall makedepend. Sorry :(

@DomT4
Copy link
Contributor

DomT4 commented Aug 21, 2015

It looks like your curl is fairly broken, from that readout.

Are you on OS X 10.6 or have you modified your system curl at all?

@matthewrossanderson
Copy link

Same here, happened after upgrading to 10.10.5

@garyfoo
Copy link

garyfoo commented Aug 22, 2015

Same problem after upgrading to 10.10.5. Tried installing the latest curl and it didn't help either.

@DomT4
Copy link
Contributor

DomT4 commented Aug 22, 2015

Are you all getting the exact same error messages? From both bottle and from-source installations? Bintray has been having some outages over the last 24 hours, so you may see Gateway Error messages on bottles infrequently.

(Side note: we only use Homebrew's curl on 10.6 and below for fetching, as 10.6's curl can't do most modern SSL connections).

@garyfoo
Copy link

garyfoo commented Aug 22, 2015

Getting the same exact error on 10.10.5 with curl 7.44.0 (x86_64-apple-darwin14.5.0) libcurl/7.44.0 OpenSSL/0.9.8zd zlib/1.2.5. I am not sure if it's a osx, curl or Bintray issue

==> Upgrading 11 outdated packages, with result:
go 1.5, gradle 2.6, maven 3.3.3, mongodb 3.0.5, mysql 5.6.26, node 0.12.7, openssl 1.0.2d_1, python 2.7.10_2, ruby-build 20150818, scons 2.3.6, sqlite 3.8.11.1
==> Upgrading go
==> Downloading https://homebrew.bintray.com/bottles/go-1.5.yosemite.bottle.tar.
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "go"
Download failed: https://homebrew.bintray.com/bottles/go-1.5.yosemite.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://storage.googleapis.com/golang/go1.5.src.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Trying a mirror...
==> Downloading https://fossies.org/linux/misc/go1.5.src.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "go"
Download failed: https://fossies.org/linux/misc/go1.5.src.tar.gz
==> Upgrading gradle
==> Downloading https://downloads.gradle.org/distributions/gradle-2.6-bin.zip
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "gradle"
Download failed: https://downloads.gradle.org/distributions/gradle-2.6-bin.zip
==> Upgrading maven
==> Downloading https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.3.3/b
Trying a mirror...
==> Downloading https://archive.apache.org/dist/maven/maven-3/3.3.3/binaries/apa
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "maven"
Download failed: https://archive.apache.org/dist/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
==> Upgrading mongodb
==> Installing dependencies for mongodb: go, scons, openssl
==> Upgrading mysql
==> Installing dependencies for mysql: openssl
==> Installing mysql dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.b
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "openssl"
Download failed: https://homebrew.bintray.com/bottles/openssl-1.0.2d_1.yosemite.bottle.tar.gz
Warning: Bottle installation failed: building from source.
Error: /usr/local/opt/makedepend not present or broken
Please reinstall makedepend. Sorry :(

@DomT4
Copy link
Contributor

DomT4 commented Aug 22, 2015

Just to clear anything up here, if you're using anything above OS X 10.6 we use the system curl in /usr/bin. We don't use Homebrew's curl for fetching on newer platforms that can handle SSL/TLS connections fine.

Anyone having a problem here, please provide the following:

  • brew doctor
  • /usr/bin/curl --version
  • A gist of:
/usr/bin/curl -v -L https://homebrew.bintray.com/bottles/gettext-0.19.5.1.yosemite.bottle.tar.gz -o /tmp/gettext-0.19.5.1.yosemite.bottle.tar.gz

AND:

brew fetch gettext -v

@garyfoo
Copy link

garyfoo commented Aug 22, 2015

Seems like I am stuck with some "Unexpected header files" issue. Please help!

Edit: I did a "which curl" and I realized that it's using curl from "/usr/local/bin/curl". Could it be that his is causing problems for my installed homebrew?

brew doctor

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
/usr/local/lib/libcurl.4.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
/usr/local/include/curl/curl.h
/usr/local/include/curl/curlbuild.h
/usr/local/include/curl/curlrules.h
/usr/local/include/curl/curlver.h
/usr/local/include/curl/easy.h
/usr/local/include/curl/mprintf.h
/usr/local/include/curl/multi.h
/usr/local/include/curl/stdcheaders.h
/usr/local/include/curl/typecheck-gcc.h

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
/usr/local/lib/libcurl.la

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
/usr/local/lib/pkgconfig/libcurl.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
/usr/local/lib/libcurl.a

/usr/bin/curl --version
curl 7.43.0 (x86_64-apple-darwin14.0) libcurl/7.43.0 SecureTransport zlib/1.2.5

/usr/bin/curl -v -L https://homebrew.bintray.com/bottles/gettext-0.19.5.1.yosemite.bottle.tar.gz -o /tmp/gettext-0.19.5.1.yosemite.bottle.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.

brew fetch gettext -v
/usr/bin/curl -fLA Homebrew 0.9.5 (Ruby 2.0.0-481; OS X 10.10.5) https://homebrew.bintray.com/bottles/gettext-0.19.5.1.yosemite.bottle.tar.gz -C 0 -o /Library/Caches/Homebrew/gettext-0.19.5.1.yosemite.bottle.tar.gz.incomplete
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
Error: Failed to download resource "gettext"
Download failed: https://homebrew.bintray.com/bottles/gettext-0.19.5.1.yosemite.bottle.tar.gz

@DomT4
Copy link
Contributor

DomT4 commented Aug 22, 2015

I would guess you force linked curl at some point, or built your own version and stuck it there. Do something like:

rm -r /usr/local/include/curl && rm /usr/local/lib/pkgconfig/libcurl.pc /usr/local/lib/libcurl.a /usr/local/lib/libcurl.4.dylib

@thomasdziedzic
Copy link

I'm experiencing similar issues after I upgraded to osx 10.10.5:

[thomas@Thomas-Dziedzics-MacBook-Pro ~]$ brew doctor
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 and just ignore them. Thanks!

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:

    mysql
    objective-caml

Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:

    brew install wget

Run `brew missing` for more details.

Warning: Some keg-only formula are linked into the Cellar.
Linking a keg-only formula, such as gettext, into the cellar with
`brew link <formula>` will cause other formulae to detect them during
the `./configure` step. This may cause problems when compiling those
other formulae.

Binaries provided by keg-only formulae may override system binaries
with other strange results.

You may wish to `brew unlink` these brews:

    homebrew/versions/mysql55
[thomas@Thomas-Dziedzics-MacBook-Pro ~]$ /usr/bin/curl --version
curl 7.43.0 (x86_64-apple-darwin14.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets
[thomas@Thomas-Dziedzics-MacBook-Pro ~]$ /usr/bin/curl -v -L https://homebrew.bintray.com/bottles/gettext-0.19.5.1.yosemite.bottle.tar.gz -o /tmp/gettext-0.19.5.1.yosemite.bottle.tar.gz
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.
[thomas@Thomas-Dziedzics-MacBook-Pro ~]$ brew fetch gettext -v
==> Downloading https://homebrew.bintray.com/bottles/gettext-0.19.5.1.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/gettext-0.19.5.1.yosemite.bottle.tar.gz
SHA1: 3b2945ec0cbb07874b0af423e3f58263ab1bbbff
SHA256: 2d656826a18a00ae28d622566903421fb8f7ff5baecd7b77ad9606bf5859cd62
==> Verifying gettext-0.19.5.1.yosemite.bottle.tar.gz checksum

@tdsmith
Copy link
Contributor

tdsmith commented Aug 24, 2015

What's otool -L /usr/bin/curl /usr/lib/libcurl.4.dylib and what's shasum /usr/lib/libcurl.4.dylib?

@thomasdziedzic
Copy link

[thomas@Thomas-Dziedzics-MacBook-Pro ~]$ otool -L /usr/bin/curl /usr/lib/libcurl.4.dylib
/usr/bin/curl:
    /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/usr/lib/libcurl.4.dylib:
    /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0)
    /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 57031.40.3)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1153.18.0)
    /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP (compatibility version 1.0.0, current version 2.4.0)
    /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 6.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
[thomas@Thomas-Dziedzics-MacBook-Pro ~]$ shasum /usr/lib/libcurl.4.dylib
1a8a817124e258b943ec9be7a654b94a6002ecc1  /usr/lib/libcurl.4.dylib

@tdsmith
Copy link
Contributor

tdsmith commented Aug 24, 2015

Same output here. Do you have a ~/.curlrc file?

@thomasdziedzic
Copy link

no :(

@thomasdziedzic
Copy link

Looks like curl just doesn't work with http/https for me

[thomas@Thomas-Dziedzics-MacBook-Pro ~]$ curl google.com
curl: (4) A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.

@tdsmith
Copy link
Contributor

tdsmith commented Aug 24, 2015

Super wacky! Are you behind a proxy? Does env | grep -i proxy turn anything up? Are any DYLD_ variables set (i.e. anything from env | grep DYLD)? (I would have expected brew doctor to call them out, but maybe we missed some.) If you create a new user account does it have the same problem? I am basically out of ideas!

@thomasdziedzic
Copy link

env | grep -i proxy and env | grep DYLD return nothing.

I'll give a couple of other shots at fixing this before I create another user on my machine.

@thomasdziedzic
Copy link

found the problem in my ~/.profile file

I had:

export SSL_CERT_DIR="/usr/local/etc/openssl/certs"
export SSL_CERT_FILE="/usr/local/etc/openssl/cert.pem"

I just got rid of these lines and it fixed my curl issues, thank you very much for your help!

@DomT4
Copy link
Contributor

DomT4 commented Aug 24, 2015

Oh! Should have thought of that. Those lines have caused problems for users of the system curl before now that we've had to look into.

It would appear Apple disable that support at compile time, as using the latest Homebrew curl for looking into this produces no such failure, but switching back to the system curl and exporting those variables causes everything (even http) to fail.

I'll look at adding a check in our brew doctor for those environmental variables.

Was this the issue for anyone else here as well?

@DomT4 DomT4 self-assigned this Aug 24, 2015
@philpennock
Copy link

It was the issue for me, but only became an issue with 10.10.5

@philpennock
Copy link

It only fails with SSL_CERT_DIR set, SSL_CERT_FILE is fine.

@kcyeu
Copy link

kcyeu commented Aug 25, 2015

Confirmed.

Removed SSL_CERT_DIR from .bashrc, now both system curl and homebrew one work on 10.10.5.

@jaredr
Copy link

jaredr commented Aug 26, 2015

I'm getting a similar error, but I don't have any SSL_* env set. OS X 10.10.5.

$ brew upgrade rust
==> Upgrading 1 outdated package, with result:
rust 1.2.0
==> Upgrading rust
==> Downloading https://static.rust-lang.org/dist/rustc-1.2.0-src.tar.gz
Already downloaded: /Library/Caches/Homebrew/rust-1.2.0.tar.gz
==> ./configure --prefix=/opt/twitter/Cellar/rust/1.2.0 --enable-clang --release-channel=stable
==> make
==> make install
==> Cloning https://github.com/rust-lang/cargo.git
Updating /Library/Caches/Homebrew/rust--cargo--git
Synchronizing submodule url for 'test/rust-installer-v1'
Synchronizing submodule url for 'test/rust-installer-v2'
Synchronizing submodule url for 'test/rust-installer-v1'
==> Checking out tag 0.4.0
==> Downloading https://static-rust-lang-org.s3.amazonaws.com/cargo-dist/2015-08-12/cargo-nightly-x86_64-apple-darwin.tar.gz
Already downloaded: /Library/Caches/Homebrew/rust--cargo-nightly-2015-08-12-nightly.tar.gz
==> ./install.sh --prefix=/private/tmp/rust--cargo20150826-94270-irrpvw/target/snapshot/cargo
==> ./configure --prefix=/opt/twitter/Cellar/rust/1.2.0 --local-rust-root=/opt/twitter/Cellar/rust/1.2.0
==> make
target/snapshot/cargo/bin/cargo build --target x86_64-apple-darwin
Updating registry https://github.com/rust-lang/crates.io-index
Downloading memchr v0.1.3
thread '

' panicked at 'called Result::unwrap() on an Err value: A requested feature, protocol or option was not found built-in in this libcurl due to a build-time decision.', ../src/libcore/result.rs:731
make: *** [cargo-x86_64-apple-darwin] Error 101
couldn't understand kern.osversion `14.5.0'

READ THIS: https://git.io/brew-troubleshooting

These open issues may also help:
Consider backporting stack overflow fix for Cargo (part of Rust) #42992

$ env | grep SSL

$ which curl
/usr/bin/curl

$ curl --version
curl 7.43.0 (x86_64-apple-darwin14.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets

@DomT4 DomT4 closed this as completed in b63698c Aug 26, 2015
@DomT4
Copy link
Contributor

DomT4 commented Aug 26, 2015

@jaredr As far as I can see, you need to report that to Rust/Cargo themselves - It looks like they're making a call that's no longer supported by Apple's curl.

@mikesmayer
Copy link
Author

THANKS!

Confirmed.

Removed SSL_CERT_DIR from .bash_profile, now both system curl and homebrew one work on 10.10.5.

@magedmakled
Copy link

in case the SSL_CERT_DIR variable persisted even after you remove it from the .bash_profile you might need to run unset SSL_CERT_DIR to unset it

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants