Error while installing RVM using Curl in Ubuntu 14.04 - ruby

I was trying to install RVM using Curl in Ubuntu 14.04.
I ran the following command:
\curl -sSL https://get.rvm.io | bash -s stable
And got the following error:
curl: (7) Failed to connect to get.rvm.io port 80: Network is unreachable
Any help to resolve this issue is highly appreciable. Thanks

Try this before execute curl:
echo ipv4 >> ~/.curlrc

curl is used to download files via HTTP much like wget and it means that a connection to the remote site is failing which is why it is unable to download. Saw this on another forum,
give it a shot and see if it works for you:
"replace the get.rvm.io part with raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer -it's the same script, just takes out some potential DNS problems on rvm's end"
Refere to this link https://www.digitalocean.com/community/questions/how-to-install-ruby-on-rails

Related

Solana installation failure with curl: (23) Failure writing output to destination

When following the Solana tool suite installation guide I got the following error which says curl: (23) Failure writing output to destination.
sh -c "$(curl -N -sSfL https://release.solana.com/v1.9.4/install)"
downloading v1.9.4 installer
curl: (23) Failure writing output to destination
solana-install-init: command failed: downloader http://release.solana.com/v1.9.4/solana-install-init-x86_64-unknown-linux-gnu /tmp/tmp.mbRp5X2BUn/solana-install-init
According to the previously asked question about curl: (23) Failure writing output to destination it seems like there is an issue with the script which at least I don't want to change myself to install Solana. Why does cURL return error "(23) Failed writing body"?
When I tried to read the Solana installation script I found that alternatively I can use wget to install Solana which I decided to use instead of curl. There are two steps you have to follow in order to get it fixed.
Uninstall curl from your system temporarily sudo snap remove curl.
Execute sh -c "$(wget https://release.solana.com/v1.9.4/install)" instead of the given command in the Solana tool suite page.
Once you install you have to update your path to add solana, you can do it by adding the following line to the ~/.bashrc file. (Make sure you update the path)
export PATH="/home/{user}/.local/share/solana/install/active_release/bin:$PATH"
I had the same problem and the problem for me was that I installed curl via sudo snap install curl . So I tried:
removing curl using sudo snap remove curl and went with the comment above, using "wget" wich did not work for me.
Then i tried reinstalling curl with sudo apt install curl and then finally
sh -c "$(curl -sSfL https://release.solana.com/v1.10.29/install)"
And it worked like a charm. I hope this helps someone!

How to connect to the agent: IPC connect call

I'm using Ubuntu (VERSION="20.04 LTS (Focal Fossa) on Windows 10. Itried to install Docker.
I'm following the Docs from docs.docker.com:
I run the two commands:
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
When I run the second command it return an error:
Warning: apt-key output should not be parsed (stdout is not a terminal)
gpg: can't connect to the agent: IPC connect call failed
I looked in internet I found that some links trying to resolve the issue but in vein.
gpg: can't connect to the agent: IPC connect call failed
https://michaelheap.com/gpg-cant-connect-to-the-agent-ipc-connect-call-failed/
Someone have a suggestion please ?
Thanks
The temporary workaround mentioned on the issue thread at https://github.com/microsoft/WSL/issues/5125#issuecomment-625985191 worked for me. Run the commands
wget https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1871129/+files/libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
sudo dpkg --install libc6_2.31-0ubuntu8+lp1871129~1_amd64.deb
sudo apt-mark hold libc6 #to avoid further update
Edit: /var/lib/dpkg/info/libc6:amd64.postinst and remove the sleep 1 like so:
Change this:
To this:

Visual Studio install issue

Trying to install the RHEL version of Visual Studio on one of my RHEL 7 Linux boxes.
Installation instructions state:
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
I receive the following when doing so:
[root#desectlas014 ~]# rpm --import https://packages.microsoft.com/keys/microsoft.asc
curl: (7) Failed connect to packages.microsoft.com:443; Connection timed out error: https://packages.microsoft.com/keys/microsoft.asc: import read
failed(2).
Can you describe what the issue is?
Thanks
The reason of this message is your computer can't reach the host packages.microsoft.com on port 443
I meet the same problem, and didn't find out the reason. However, you can do a workaroud.
wget https://packages.microsoft.com/keys/microsoft.asc
rpm --import microsoft.asc

Homebrew installation on Mac OS X Failed to connect to raw.githubusercontent.com port 443

When I try to install Homebrew, I am getting following connection refused error. Please help me to solve this problem.
$ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
Works for me. Unless its a real problem with github, which it may be but I'm going to guess that its not, its probably a problem with your connection.
Can you get to the same URL via a browser?
https://raw.githubusercontent.com/Homebrew/install/master/install
If you get an error there too, you know what your problem is. (Talk to your network admin)
If that works...maybe try doing just the "curl" command in your terminal to see if curl gives a more specific error?
Also, if that does work, save that file to a file on your computer (brew_install.rb) and then run it via
ruby brew_install.rb
If you are behind a proxy, try this:
sudo vim /etc/hosts
#add the line below and :wq
199.232.28.133 raw.githubusercontent.com
The accepted Answer is outdated now. But based on the answer I solved the problem by:
open the home page of brew https://brew.sh/
copy the URL from the install cmd and open it on your browser https://raw.githubusercontent.com/Homebrew/install/master/install.sh
right-click and save it to your computer
open a terminal and run it with: /bin/bash path-to/install.sh
It was a company proxy problem for me and the solution as mentioned here worked for me.
export HTTPS_PROXY=https://<proxy.mycompany>:<port>
git config --global https.proxy $HTTPS_PROXY
git config --global --get https.proxy
I had the same error,
- Disabled VPN
tried again installing without VPN
It worked for me.
There are several situations here, you can do following things :
reinstall the xcode command line tool by removing the old tools ($ rm -rf /Library/Developer/CommandLineTools) and xcode-select --install
request web page
https://raw.githubusercontent.com/Homebrew/install/master/install
then save it's content to shell file then run it.
change your DNS server to 8.8.8.8 (This is worked for me : ] )
Finally you should run /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
First try to open the link in the browser if it doesn't open then changing the DNS is the answer.
For me changing the DNS to 8.8.8.8 worked for me.
DNS settings can be searched for in the system setting which can be launched through spotlight in Mac OS and then changed.
This solved the pertinent issue for me.
I've seen this a few times on other people's machines and it seems to be fixed after you install xcode, i.e. xcode-select --install
The method of using ruby is probably outdated, as shown below:
As a better alternative, please set your computer's DNS server to 8.8.8.8
These steps solved the problem:
xcode-select --install
restart the Mac
Execute this command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
and it should work.
Check is https proxy is set
env|grep -I proxy
Then if it is set, remove the env variable
unset HTTPS_PROXY
I solved this problem by the following steps:
removing the old tools ($ rm -rf /Library/Developer/CommandLineTools)
install xcode command line tools again ($ xcode-select --install).
Although saving the shell file locally and then running it can solve this problem, but you'll meet it again when you do something similar(e.g. install oh-my-zsh, vim-plug, etc.)
At last, I find the 3rd item of this answer(https://stackoverflow.com/a/61787208/5458745) works best for me, as it can also solve the problem I meet when installing other tools using curl. However instead of changing the DNS, I add 8.8.8.8 to my original DNS server list, which works fine for me.
Change your DNS server to 8.8.8.8 (This is worked for me)
I solved it.
You can visit https://github.com/Homebrew/install/blob/master/install.sh to get this install.sh by copy the whole contents.
Then paste it into install.sh and run sh install.sh.
A combination of what #blueskin mentioned first and then what #Ferenc Yim mentioned is what worked for me.
The script also requires sudo access (not necessarily run with a sudo prefix just need admin access)
sudo vim /etc/hosts
Once the vim code editor is open add the following line at end of the file
199.232.68.133 raw.githubusercontent.com

curl: (7) error when i try installing Homebrew on iMac

Setup iMac OSX 10.7.4,
Hi there,
I am trying to install Homebrew on my iMac but I keep getting an error. I am following the instructions on https://github.com/mxcl/homebrew/wiki/installation
I have Xcode installed and the Java Developer update which it specifies on the website.
I open Terminal and paste
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
But I keep getting the error
curl: (7) couldn't connect to host
Has anyone any suggestions?
EDIT:
Just to add I am on a college network incase its relevant
EDIT: I have also reinstalled Curl
For my specific case, I use SOCKS proxy for all traffic. So my installation command is:
ruby -e "$(curl -fsSL --socks5 127.0.0.1:30000 https://raw.github.com/mxcl/homebrew/go)"
where 127.0.0.1:30000 is the SOCKS proxy.
Something is blocking your connection to github. Try accessing the url https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb in your browser.
My issue was Curl not being configured to bypass my proxy.
One of they guys here in the office sorted it out for me. From what I understand the settings on curl had to be changed and not the proxy.
Hopefully this will help others in future.
I too had same problem.
The recipe for proxies should add --noproxy after curl statement
ruby -e "$(curl --noproxy -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
I also ran into this error and in my instance it was because my firewall was blocking or preventing outbound connections to Japan where it was trying to pull down the ruby version. Once the firewall rule was adjusted to allow the connections to that country everything worked fine.

Resources