Installing cURL & Git on Mint / Ubuntu Linux
I started working on Windows for my Ruby on Rails (RoR) environment. It worked fine for couple of days but now I started getting different types of error and trying to troubleshoot those for last two days and am not able to resolve it.
In my research during troubleshooting, I came to conclusion that Windows is not the best environment for developing on Ruby on Rails. Hence, I selected to go with Linux. So I decided to install Mint (Flavor of and extension to Ubuntu) Linux on a VirtualBox. I have worked with Linux few times so I am kind of familiar but not an expert in any way. I started creating my environment for RoR. I was on good start and I realized that I made some errors (more detail I will explain in my upcoming post) and wasted so much of time. So I created new VM and have started step by step process. I didn't have cURL installed on my machine so I installed that first. You can download the cURL from this site. I tried with downloading latest tarball and untar it, followed by running make command but for some reason it didn't work. So after few minutes, I decided to go with apt-get command.
$ sudo apt-get install curl
After 2 minutes wallah!! I was able to see the version of curl. To check that you can write
$ curl --version
Current version for cURL is 7.24 and I have 7.21.6 installed. The issue with apt-get install command is, you always get older version, but at the same time it is the easiest and fastest way to install. I am hoping that this would not affect anything else. However, I will be updating to current version (as soon as I figure out how to do it on command line).
Now I was off to installing Git. I downloaded latest version from git site for Linux. I've untar the tarball and when I tried to run make command I got following error:
/bin/sh: curl-config: not found CC daemon.o In file included from cache.h:4:0, from daemon.c:1: git-compat-util.h:168:25: fatal error: openssl/ssl.h: No such file or directory compilation terminated. make: *** [daemon.o] Error 1
I looked at many sites but didn't find any positive or useful information that allows me to install the Git properly. I kept on searching and came across a blog post by Evgeny Goldin - 3 ways to install Git on Linux (Ubuntu). This was a life saver for me. The git version I downloaded from site is 1.7.9.3. I started following his advise and I was able to install it. This is what I did:
$ cd git-1.7.9.3
$ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
$ make prefix=/usr/local all
$ sudo make prefix=/usr/local install
$ which git /usr/local/bin/git (note: you will see this line when you do which git)
$ git --version git version 1.7.9.3
Now I am off to installing Ruby and then Rails on my Linux box. I will update more as soon as I complete the installation and have working solution.
To find out other options for you to install Git visit Evgeny Goldin's blog (If his blog was on tumblr I could have just re-blogged it.) - Goldin++'s article - 3 ways to install Git on Linux (Ubuntu).









