I am trying to install homebrew using:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
but then this error appears:
curl: (60) SSL certificate problem: self signed certificate
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
I tried adding -k:
/bin/bash -c "$(curl -fsSLk https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
but that still doesn't seem to work.
You can download Homebrew script from your browser directly. All you need to do is:
open this https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
And save script to any folder then run this command in Terminal.
/bin/bash install.sh
Note: Don't forget to change directory to where downloaded script is available.
I will post more update if I find this curl problem fix. :)
Related
New to most everything.
New MacBook Pro M1Max
trying install homebrew per pre-class instructions.
pasted-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
get following message- checking for 'sudo' access (which may request your password)...
password:
I am stuck. Have no knowledge or experience at this point, never saw this happen on any of the youtube tutorials i have watched.
assist/guidance appreciated.
following the instructions on the official vpn page (instructions install openvpn client) in the second step:
curl -fsSL https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg
I get the following error message:
sudo curl -fsSL https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg
-bash: /etc/apt/trusted.gpg.d/openvpn-repo-pkg-keyring.gpg: Permission denied
(23) Failed writing body
Thanks in advance!!!
I had a similar issue recently. Use
sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
and
sudo apt-key add openvpn-repo-pkg-key.pub
Reference -
https://openvpn.net/cloud-docs/openvpn-3-client-for-linux/
The tutorial you posted is still valid, but as it was pointed out in the comments, you have to run the commands as superuser (I just tested sudo but it wouldn't work either).
Moreover, apt-key is mostly deprecated, so be careful with the accepted solution. If you follow the steps there, you will get a deprecation warning every time you run apt update.
I am attempting to install OCaml via the OCaml opam package manager on MacOs. I have successfully installed opam via homebrew. Initiating the package manager with opam init yields the following error:
[ERROR] Could not update repository "default":
OpamDownload.Download_fail(_, "Curl failed: \"/usr/bin/curl
--write-out %{http_code}\\\\n --retry 3 --retry-delay 2
--user-agent opam/2.1.0 -L -o
/private/var/folders/c_/6splkz692w16x82lzgnsxgfr0000gn/T/opam-57814-6b2069/index.tar.gz.part
-- https://opam.ocaml.org/index.tar.gz\" exited with code 60")
[ERROR] Initial download of repository failed.
What can I do to facilitate successful connection to the repository and initialise opam?
This error message indicates that curl is unable to establish the authenticity of the peer, i.e., https://opam.ocaml.org
This could happen because the certificates on either side are outdated. We can easily check if opam.ocaml.org is up-to-date, using one of the available online SSL checkers, e.g., this one says that they are OK. So it looks like that the problem is on your side.
First of all, you should try using your operating system upgrading options to get everything up-to-date.
If it is not an option, then you can use the --insecure option that you can pass using the OPAMFETCH environment variables. Or you can download the corresponding certificates and store a path to them in the ~/.curlrc, look here for more information.
I had the same problem and solved it by first running brew install wget and then opam init, which suddenly worked.
I ran into the same issue and I found a workaround on the OCaml forum: here. (Credits to UnixJunkie)
You can run:
opam init github git+https://github.com/ocaml/opam-repository.git
This should avoid the certificate issues.
I tried to use ivg's solution but must have made a mistake in moving the .pem files, so I couldn't get that solution to work. The workaround was quick.
Update
The reason opam init failed for me was because curl was installed with snap on my system.
Try to run opam init -verbose and that could reveal more about why you ran into an error.
In my case I needed to install other things with opam and it kept failing every time. So snap uninstall curl and then sudo apt install curl fixed things. (Was only able to figure this out with help from my professor)
Install curl first.
On MacOS: brew install curl
On Debian/Ubuntu Linux (and derivations): sudo apt-get install curl
I tried to install homebrew onto my mac, but I couldn't because curl wasn't found. I typed:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This returned this error:
-bash: curl: command not found
So, I tried to install curl but apparently to install curl, I need to use curl? This is what I found:
Run in Terminal app:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" <
/dev/null 2> /dev/null
Run:
brew install curl
Done! You can now use curl.
However, this uses curl to install curl, so it gives the same error message: -bash: curl: command not found
TL;DR, how do I install curl on mac without using curl
I solved the problem!
To use bash on mac:
Go to terminal ––> preferences
Click on Shells open with: and set it to Command (complete path)
Enter one of the following:
/bin/bash
/bin/csh
/bin/zsh
/bin/zsh-4.0.4 (Mac OS X 10.2.8 or earlier)
/bin/zsh-4.1.1 (Mac OS X 10.3 or later)
/bin/ksh (Mac OS X 10.4 or later)
/bin/ksh worked for me
Source
I thought I broke my curl symlink somehow too, and somewhere in there I ran into your same issue, where no command would work. Somewhere in this mess, I fixed it.
https://brew.sh/
The main website requires you to install wget, maybe it gets deleted when you uninstall homebrew.
Regardless I found a way to install it using Ubuntu commands.
https://xmrig.com/docs/miner/build/ubuntu
but ran into an issue where I had to download cmake from the developer website and add it to the path in it's menu options on Mac OS X 10.11 to compile and run my program as ./program instead of program, then I installed macports(opened a new terminal window), and installed hwloc with macports, to no avail, just getting totally different errors.
I've also tried to add curl as an alias of curl into the bash profile and it recognized the error after I used this;
https://github.com/Homebrew/homebrew-core/issues/5084
However, I forgot I have an identical computer that is working just fine, but when I run "which curl", in the working computer, I get /usr/bin/curl, instead of /usr/local/bin/curl, so I ran
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/bin/curl"
I'm still getting the error, so I used vim, to sudo edit the /etc/paths file by using
sudo vim /etc/paths
i for edit
esc to exit edit mode
:x to save
Restart Terminal
Still getting a 403 SNI Error cannot download Python 3.9
rm -rf /opt/local/bin/curl
rm -rf /usr/local/bin/curl
which curl finally returns the correct path, /usr/bin/curl
exit
Restart Terminal
Still same error so I removed /usr/bin/curl from /etc/paths, and export file. Also deleted the bash profile, as the working computer doesn't return one, and...still the same error, so I conclude that "curl is not in path" should be ignored.
I did get brew doctor to return with no errors.
brew upgrade curl
curl not installed
brew install curl
403 Error SNI is required.
brew upgrade openssl
openssl 1.1.1j already installed
In my case, I made a mistake while editing my $PATH.
I would recommend looking at all your ~/.bash_profile and ~/.zshrc.
Remove ALL code related to $PATH. Carefully add things back in.
Hi I'm trying to install RVM onto a Mac OsX v 10.4.11.
Into the terminal I type:
curl -L get.rvm.io | bash -s stable
I receive this message:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 185 100 185 0 0 387 0 --:--:-- --:--:-- --:--:-- 0
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). The default
bundle is named curl-ca-bundle.crt; you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
I found similar questions on StackOverflow eg Curl Certificate Error when Using RVM to install Ruby 1.9.2, but a) this is a problem with installing RVM in the first place, not using RVM to install a new version of Ruby and more importantly b)the best answers to similar questions have suggested this is an error generated when referring to RVM's old site ie. rvm.beginrescueend.com. The solution given is to use
curl -L get.rvm.io | bash -s stable
which is what I am using but which is generating, for me, this error message, and hence why I am stuck. Any help would be greatly appreciated, thanks
Phillip
I installed RVM successfully on Mac OS X Server 10.4.11.
You need:
Xcode 2.5, the latest Xcode for Tiger
MacPorts installed, configured, and up-to-date
gcc-4.2 Apple build 5566, instructions later...
curl
We need curl to use newer certs. Download an up-to-date certificate bundle, and configure curl to use it. Note the cacert.pem path must be absolute.
mkdir ~/.certs
curl -o ~/.certs/cacert.pem http://curl.haxx.se/ca/cacert.pem
echo cacert = \"/Users/your-username/.certs/cacert.pem\" >> ~/.curlrc
Upgrade bash
Next, to properly execute RVM's install script, we must upgrade bash. I used the latest release, version 4.2.
mkdir ~/tmp
cd ~/tmp
curl -C - -O ftp://ftp.cwru.edu/pub/bash/bash-4.2.tar.gz # letter O, not a zero
tar zxf bash-4.2.tar.gz
cd bash-4.2
./configure && make && sudo make install
sudo bash -c "echo /usr/local/bin/bash >> /private/etc/shells"
chsh -s /usr/local/bin/bash
cd /bin
sudo mv bash bash-old
sudo ln -s /usr/local/bin/bash bash
Log into a new shell, and you should be running bash 4.2.
bash --version
#=> GNU bash, version 4.2.0(1)-release (powerpc-apple-darwin8.11.1)
#=> ...
Upgrade libtool
Use macports to upgrade the libtool package. This step is necessary to properly configure yaml.
Make sure macports is up-to-date and ready to go.
sudo port install libtool
This will take bloody ages, for there are many dependencies to compile. Grab a sandwich.
Install gcc-4.2
Your rubies will not compile yet because it tries to use gcc-4.2, which Xcode 2.5 doesn't provide. We must install it ourselves. Download it from AT&T Research:
curl -C - -O http://r.research.att.com/tools/gcc-4.2-5566-darwin8-all.tar.gz
Apple packed this tarball relative to the root directory (/), so this one-liner will extract everything into place.
sudo tar fvxz gcc-4.2-5566-darwin8-all.tar.gz -C /
Done.
Install RVM.
curl -L get.rvm.io | bash -s stable --ruby
RVM should install, yaml and ruby should compile, and you should be good to go.
While installing rails and friends, documentation conversion to UTF-8 gave me warnings, which I'm not too concerned about. The important parts installed without a hiccup.
I am running Mac OS X Server 10.4.11 Build 8S2169 on a Mac Server G4 (QS2002) DP 1.0.
Does echo insecure >> ~/.curlrc work for you? I don't actually use a Mac.
Just read the message, it tells you what to do.
David suggestion will work, but remember it brings all your downloads via curl or git into insecure mode - not validating if the certificate is trusted.
As a hint you might get this answers also helpful (more then the error you got):
https://stackoverflow.com/a/7599151/497756
https://stackoverflow.com/a/7901540/497756
https://stackoverflow.com/a/6817139/497756