to build Git and install it under /usr, run make

on my ubuntu wsl to build Git and install it under /usr, run make i entered command- make all doc info prefix=/usr but it gives error make: *** No rule to make target ‘all’. Stop. i don’t know how to resolve this

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @ishita650,

It seems like you want to install git from source. You can use the apt package management tools to update your local package index. Afterwards, you can download and install the program:

sudo apt-get update
sudo apt-get install git

This will download and install git to your system.

If you want to build it from source, then it will be a little bit harder. First run:

sudo apt-get update
sudo apt-get install build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip

After you have installed the necessary dependencies, you can go ahead and get the version of git you want by visiting:

Click on Branch:master–> Tags and select the version you need. To download the version

wget -O

Unzip the file that you downloaded and move into the resulting directory by typing:

cd git-*

Now, you can make the package and install it by typing these two commands:

make prefix=/usr/local all
sudo make prefix=/usr/local install

Regards, KDSys