brew error SSL23_GET_SERVER_HELLO - macos

I'm trying to install cairo on mac 10.13.6 using brew 1.2.2. I'm getting this error:
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
I'm behind a corporate proxy and have set the http_proxy and https_proxy variables. When I use the brew verbose option it looks like it is using Apple's default curl libraries (not sure why, but various comments hint that this version is problematic):
brew install -v cairo
...
Downloading https://...libpng...
/usr/bin/curl --remote-time --location --user-agent ...
curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Check version:
/usr/bin/curl --version
curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
I downloaded and built the newest curl library from here. Using this curl install I can download libpng manually.
./configure --prefix=~/curl --with-darwinssl
curl ...libpng... > libpng-1.6.34.tar.xz
I tried to get brew to use this curl install by prefixing my path:
export PATH=~/curl:$PATH
But it looks like brew is still using Apple's curl lib (output did not change from the above).
My question is: how do I make brew use this new curl install? Or am I just on the wrong track to make this work?

Related

Homebrew specific version of sshuttle

While I was trying to install the older version of Sshutle,
I am trying to install sshuttle version 0.78.5 and using this command:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/276d373c333dd386a9220d0f535633e15b844e17/Formula/sshuttle.rb
I am getting this error:
Calling Installation of sshuttle from a GitHub commit URL is disabled!
Use 'brew extract sshuttle' to stable tap on GitHub instead.
How do I enable the command?
Use of brew extract is not trivial. I think simplest solution for you is to execute:
curl --silent \
https://raw.githubusercontent.com/Homebrew/homebrew-core/276d373c333dd386a9220d0f535633e15b844e17/Formula/sshuttle.rb \
--output sshuttle.rb
brew install ./sshuttle.rb

siege - HTTPS requires libssl - MacOS Mojave

I Installed SIEGE 4.0.4
I install from source
I install this too :D :
brew install openssl
brew install zlib
But im getting this error:
[error] HTTPS requires libssl: Unable to reach sitename.tld with this protocol: Socket is already connected
Installing through brew worked for me:
brew install siege
You might also need to set up flags as described:
If you need to have openssl first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
For compilers to find openssl you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
Note: this was suggested in this answer, but I can't mark it as duplicate because it hasn't been accepted.

Fixing homebrew on Mac OSX 10.13.2

Just wondering if anyone can help fix homebrew for me. It was working a minute ago...
I am trying to install new packages using Homebrew on my 2 Macbooks. Both are running High Sierra, which I suspect might be the problem due to Apple borking root permissions...
Anyway, my issue goes a little something like this:
❯❯❯ brew install git
Error: git 2.14.2 is already installed
To upgrade to 2.15.1, run `brew upgrade git`
Okay. Lets upgrade Git.
❯❯❯ brew upgrade git
==> Upgrading 1 outdated package, with result:
git 2.15.1
==> Upgrading git
==> Downloading https://homebrew.bintray.com/bottles/git-2.15.1.high_sierra.bottle.tar.gz
Error: curl is not executable
Warning: Bottle installation failed: building from source.
==> Downloading https://www.kernel.org/pub/software/scm/git/git-2.15.1.tar.xz
Error: curl is not executable
Strange. I use curl daily...
❯❯❯ curl
curl: try 'curl --help' or 'curl --manual' for more information
❯❯❯ which curl
/usr/bin/curl
❯❯❯ ls -al /usr/bin/curl
-rwxr-xr-x 1 root wheel 185104 Dec 1 15:45 /usr/bin/curl
So it exists and looks executable. Maybe the homebrew links got messed up? I will re-install curl using brew
❯❯❯ brew install curl
==> Downloading https://homebrew.bintray.com/bottles/curl-7.57.0.high_sierra.bottle.tar.gz
Error: curl is not executable
Warning: Bottle installation failed: building from source.
==> Downloading https://curl.haxx.se/download/curl-7.57.0.tar.bz2
Error: curl is not executable
So basically homebrew is not working for me. On TWO different machines running the same Mac OS version 10.13.2
NOTE: This is not limited in any way to installing git. The problem started trying to install minikube.
UPDATE
I checked my setup via brew config and noticed that although I DO have curl installed, homebrew does not see it: Curl: N/A
HOMEBREW_VERSION: 1.4.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: b4d43e950fd45c24e48d6ebfd3013357abcd21a9
Last commit: 10 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 809322678d0fb7ab034348f86f0e452eff203b49
Core tap last commit: 73 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_VISUAL: nano
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/bin/ruby
Clang: 9.0 build 900
Git: 2.14.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: N/A
Perl: /usr/bin/perl
Python: /usr/local/opt/python/libexec/bin/python => /usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Java: 1.8.0_31
macOS: 10.13.2-x86_64
Xcode: 9.2
CLT: 9.2.0.0.1.1510905681
X11: 2.7.9 => /opt/X11
The OS already has curl installed, but homebrew does not see it.
I cannot install curl using homebrew (see above).
So now the problem becomes "How do I fix homebrew so it sees curl"?
I was running into the same issue yesterday. For me it was caused by a file called curl left over from a botched command in the same directory where I was running brew. Deleting that file resolved the issue.
I had same problem and I have no idea how but I fixed it. First I uninstalled any brew-version of curl that was installed. Then, when that didn't work, I navigated to \bin\usr\curl to make sure it was still there. I then ran curl in terminal (just literally `curl' and then which curl to make sure it was using right one), and then reran brew and it seemed to work. I think what happens is that for some reason in new Mac files sometimes don't appear locally until you open them for the first time when using iCloud. Its happened before with other dependencies, where I had to navigate to file and physically open it before it would be locally downloaded and be recognized as a dependency. Not sure if Mac does same thing with curl. If so, quite dumb.
I had this same issue, also on Mac OS High Sierra. I ended up running brew uninstall curl. This gave me an error, but then when I installed Homebrew curl again, it worked and I could install git and others.
if you have tried everything and nothing helps, if you're facing permissions issues - try to re-install the Homebrew:
uninstall:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
and then install it again:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
helped in my case

How to install Siege with libssl?

I am trying to install Siege with libssl on Mac OS 10.12, but when I use the utility against an https url I am receiving the following error.
[error] HTTPS requires libssl: Unable to reach https://example.com/
with this protocol: Socket is already connected
I am installing with the following commands from this wiki:
./configure --with-ssl
make
make install
This is on macOS Mojave, with openssl installed using HomeBrew. You'll be using a brew command to get the openssl install directory:
git clone https://github.com/JoeDog/siege.git
cd siege
./utils/bootstrap
# here's what you're looking for:
./configure --with-ssl=$(brew --prefix openssl)
make
Now you can run siege with ./src/siege https://whatever.domain.invalid. This was tested with Siege 4.0.4rc3 commit hash 05dcfac88ecdd57bd94276e4ce82477cba9129b6 and openssl 1.0.2s on macOS 10.14.5.
use brew to install siege.
it fixed the issue for me. the only extra thing i had to do was to link siege.
https://coderwall.com/p/qfrk1w/making-siege-work-with-https-on-os-x-mavericks .
brew uninstall siege
brew install openssl
brew link --force openssl
brew install siege
The extra steps ti had to do (Mac OS Sierra low) .
ln -s /usr/local/Cellar/siege/4.0.4/bin/siege /usr/local/bin/siege .

SFTP Support for curl on OSX

I am trying to get SFTP support for curl in OSX. I installed curl via
$ brew install curl --with-ssh
and I also symlinked the homebrew version to the /usr/bin via
$ sudo ln -s /usr/local/bin/curl /usr/bin/curl
But I am still getting a
curl: (1) Protocol sftp not supported or disabled in libcurl
when using
$ curl sftp://some.host.com/path/to/file
My endeavor is connected to an issue for the awesome git-ftp https://github.com/resmo/git-ftp/issues/146
What am I doing wrong?
run 'curl -V' and see if SFTP is listed as a supported protocol.
If it isn't, curl needs to be rebuilt with libssh2 to get the support built-in.
Since the --with-libssh2 option was removed from brew, this is the way to go:
brew install curl-openssl
Be aware:
curl is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
If you need to have curl first in your PATH, run:
echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.zshrc
or call it directly by using:
/usr/local/opt/curl/bin/curl ...
If you are on a mac you will have to run this to enable first:
brew install curl --with-libssh2

Resources