Error trying to run rbenv install 2.5.1 - ruby

I'm trying to install ruby using rubenv but i'm running into following error:
rbenv install 2.5.1 -v
/tmp/ruby-build.20180525142355.3872 ~
Downloading ruby-2.5.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.bz2
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.haxx.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.
error: failed to download ruby-2.5.1.tar.bz2
BUILD FAILED (Ubuntu 18.04 using ruby-build 20180424)
I'm using Windows 10 Subsytem for Linux. Issue seems to be related to certs but i don't know how to go around it.

Related

Issues during wget of sonarqube

I am trying to install SonarQube server on Ubuntu14.04 system.
When I do
wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.3.zip
i am getting certificate error which says
ERROR: cannot verify akamai.bintray.com's certificate, issued by ‘/C=NL/L=Amsterdam/O=Verizon Enterprise Solutions/OU=Cybertrust/CN=Verizon Akamai SureServer CA G14-SHA2’:
Unable to locally verify the issuer's authority.
I have tried installing the certificate using openssl, still I am unable to get the binaries. I have also updated the ca-certificates using update-ca-certificates, but with no luck.
Can anyone help me on this?
As a workaround:
https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-5.3.zip
redirects to
https://akamai.bintray.com/4e/4e61ee3a01d5e447bcd64357df77e0377325c4a2bb5ceb2cdeb5a5d193443ba5?__gda__=exp=1471600642~hmac=2b041a2929611ac66b6e703c87e0f08a939a5f4cf7a2b9ffa2d7ba3e5a2d7f3e&response-content-disposition=attachment%3Bfilename%3D%22sonarqube-5.3.zip
which seems to be available over HTTP.
So you can try:
wget "http://akamai.bintray.com/4e/4e61ee3a01d5e447bcd64357df77e0377325c4a2bb5ceb2cdeb5a5d193443ba5?__gda__=exp=1471600642~hmac=2b041a2929611ac66b6e703c87e0f08a939a5f4cf7a2b9ffa2d7ba3e5a2d7f3e&response-content-disposition=attachment%3Bfilename%3D%22sonarqube-5.3.zip"

OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Failed to enable crypto

I am using OS X Yosemite
I ran the following command in Composer because Laravel fails to download and install properly all the time:
composer diagnose
result:
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Checking github.com rate limit: FAIL
[Composer\Downloader\TransportException] The "https://api.github.com/rate_limit" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Checking disk free space: OK
Checking composer version:
[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: SSL ope
ration failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
Failed to enable crypto
failed to open stream: operation failed
The main line I want to focus on is:
SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Failed to enable crypto
How can I fix this. I have tried several solutions on the web and none have worked. I am totally new to the use of the command line.
When downloading and installing Laravel with the following command: composer create-project laravel/laravel --prefer-dist can't I just manually download the stuff myself and place it in the correct folder to avoid this SSL problem?
Note: I am running OS X Yosemite. I believe this works with Mavericks too.
After looking a several answers and combining them mixing and matching etc. Here is a rough explanation on what I did.
Open the command line and run:
locate cacert.pem
This will list all the locations where your certificates are.
My result:
/Applications/Adobe Dreamweaver CS6/Configuration/Certs/cacert.pem
/Applications/MAMP/Library/lib/python2.7/test/pycacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip/_vendor/requests/cacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/pycacert.pem
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_asyncio/pycacert.pem
/Users/robert/.composer/cacert.pem
/opt/vagrant/embedded/cacert.pem
/usr/ssl/certs/cacert.pem
I downloaded the most recent one from curl
http://curl.haxx.se/docs/caextract.html
I made a directory in /usr/ssl/certs/
and put the downloaded cert there /usr/ssl/certs/cacert.pem
I opened up my php.ini file and placed this line at the top of the file:
openssl.cafile=/usr/ssl/certs/cacert.pem
Restart apache (stop apache and start it again)
Everything worked out for me.
Now one thing that I do believe needs to be done is you need to tell the command line which PHP you are referring to. I am running PHP under XAMPP and not natively on my OS X. So the command line will think that you are referring to the native PHP on OS X and not the one running on XAMPP. This needs to be changed I believe for this to work. If not then it should be good.
As mentioned this solution worked for me.
I faced this issue while executing composer install in Magento 2 , on MAMP , Mac m1 the issue was fixed after I replaced the file in path : /Applications/MAMP/Library/OpenSSL/cert.pem
with the pem file downloaded from the :
http://curl.haxx.se/docs/caextract.html
hope this helps someone on .
The easiest way without the need to change the php.ini file:
DEBIAN/UBUNTU:
# apt-get install ca-certificates
FEDORA:
# dnf install ca-certificates.noarch
CENTOS/REDHAT
# yum install ca-certificates.noarch
Source:
https://linuxconfig.org/routines-ssl3-get-server-certificate-certificate-verify-failed
Another possible reason is that the server's SSL cert has expired. If it is your server, check the /etc/apache2/ssl (for ubuntu). The certs usually last for 365 days. See 'https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04' on how to create one.

Creating Python 3.4 Environment in Anaconda

I have Python 2.7 Anaconda 64 bit on Windows 7.
I want to create a Python 3.4 environment. So at the command I typed:
conda create -n py34 python=3.4 anaconda
I get the following problems
Fetching package metadata: Could not connect to https://repo.continuum.io/pkgs/pro/noarch/
.Could not connect to https://repo.continuum.io/pkgs/pro/win-64/
.Could not connect to https://repo.continuum.io/pkgs/free/noarch/
.Could not connect to https://repo.continuum.io/pkgs/free/win-64/
it then runs through all the packages and gives another error:
Could not connect to https://repo.continuum.io/pkgs/free/win-64/menuinst-1.0.4-py34_0.tar.bz2
Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590): https://repo.continuum.io/pkgs/fre
e/win-64/menuinst-1.0.4-py34_0.tar.bz2
Then of course when I type
activate py34
I get:
No environment named "py34" exists in C:\Users\martbar\AppData\Local\Continuum\Anaconda\envs
any ideas what could be the issue? I am on a corporate PC but when I looked at the firewall on my PC it said it was off.
The underlying connection to https://repo.continuum.io is not passing a certificate verification test. You can go there in your browser to see if your OS may be missing this certificate. If so, then run Windows Update and look for a "Update for Root Certificates for Windows 7" entry that you can install.

Go package installation failing for unknown certificate authority

I'm attempting to install a Go module from bitbucket as follows:
go get bitbucket.org/kardianos/osext
But I receive the following error:
package bitbucket.org/kardianos/osext: Get https://api.bitbucket.org/1.0/repositories/kardianos/osext: x509: certificate signed by unknown authority
Google lead me to the instructions at this post, which I have followed by editing /etc/mercurial/hgrc to contain:
[web]
cacerts = /etc/ssl/certs/ca-certificates.crt
as instructed for my OS (Debian), however I still receive the same error.
what else can I do?
it looks like I'm still using 1.0.2 (the version provided with Debian wheezy)
Considering that this looks like a Go 1.0 bug, the first thing to check is to upgrade Go to 1.3+.
net/http: use tls host instead of proxy, when checking against a certificate
That could solve the certificate issue.
Golang Debian packages mentions 1.3.2 (but for Debian Jessie, not wheezy)
You can follow "How to install Golang 1.1(+) in Debian from repository " for more.
(Done after "How can I run Debian stable but install some packages from testing?")

install imagemagik using homebrew, shell

ive been trying to get imagemagik onto my mac using homebrew and the terminal when i run
$ brew install imagemagick
i get
==> Installing imagemagick dependency: pkg-config
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.27.1.lion.bottle.tar.gz
curl: (52) Empty reply from server
Error: Download failed: https://downloads.sf.net/project/machomebrew/Bottles/pkg-config-0.27.1.lion.bottle.tar.gz
is that just to do with a part of sourge force not responding, or is it an error on my end, ive not seen a "52 empty reply from server" before, is that a similar to a 500 error ?
for the record im running the latest xcode and lion.
SourceForge (sf.net) is currently down.
Did you set proxy to access the web?
I installed ImageMagick. First I got the error message:
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/imagemagick-6.8.0-
curl: (56) Recv failure: Connection reset by peer
This reason might be caused by GFW in China. Then I used a sock server and set http_proxy, I got the error message like yours:
curl: (52) Empty reply from server
At last I modified #HOME/.curlrc by adding "--socks5 127.0.0.1:1080", and reinstall ImageMagick successfully.

Resources