Question

Based on the Pro Git book by Scott Chacon on page 9, to install Git on Ubuntu we need to have libraries that Git depends on: curl, zlib, openssl, expat, and libioconv. Thus, I type

$ sudo apt-get install curl-devel expat-devel gettext-devel openssl-devel zlib-devel

and I got the error message

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package curl-devel

So has anyone ever met this issue?

I'm using Ubuntu 10.04 LTS, and the Git version I'm trying to install is git-1.7.3.

Thank you.

Was it helpful?

Solution

Have you tried simply sudo apt-get install git-core? Package managers are designed to resolve dependencies for you, so that you don't have to do it manually. Granted, the version of Git that's in the lucid package repository is 1.7.0, but unless you really need the very latest version, it may be much simpler to just go with the one supported for your release (or update Git later after installing the supported version).

apt would go and find the dependencies listed here for you, and prompt you to have it automatically install them as well.

OTHER TIPS

You probably want libcurl-dev, though if you just need a version of git, git-core should be fine.

If you want to build a git source tarball apt-get build-dep git-core should install all the development packages you need.

You can install git directly on ubuntu with simply:

apt-get install git-core

This will take care of all dependencies for you.

If you really want to build it from source, run:

apt-get build-deps git-core

This will retrieve all dependencies needed to build git (at least, the version of git available in ubuntu) for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top