Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
– The Git website
Choose one of the following options.
Determine on which Linux distribution your system is based on. See List of Linux distributions – Wikipedia for a list. Most Linux systems – including Ubuntu – are Debian-based.
Open a terminal window. Copy & paste the following into the terminal window and hit Return
. You may be prompted to enter your password.
sudo apt update
sudo apt upgrade
sudo apt install git
You can use Git now.
Open a terminal. Copy & paste the following into the terminal window and hit Return
. You may be prompted to enter your password.
sudo yum upgrade
sudo yum install git
You can use Git now.
Homebrew […] simplifies the installation of software on the Mac OS X operating system.
Copy & paste the following into the terminal window and hit Return
.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew doctor
You will be offered to install the Command Line Developer Tools from Apple. Confirm by clicking Install. After the installation finished, continue installing Homebrew by hitting Return
again.
Copy & paste the following into the terminal window and hit Return
.
brew install git
You can use Git now.
Hi there, I'm using kali linux I still getting this error while trying to download git : Sub-process /usr/bin/dpkg returned an error code (1)
what I have to do here??
@hadiheib99 You don't mention the entire apt
readout, but one of your packages may be broken.
Here are a few things you can try (run sudo apt update
after each).
The first method you can try is to reconfigure the package database.
Perhaps the database got corrupted while installing a package.
Reconfiguring often fixes the problem.
sudo dpkg --configure -a
If a package installation was interrupted previously, you may try to do
a force install.
sudo apt install -f
If it’s not an issue for you, you may try to remove the broken package
manually. Don’t do this for Linux Kernels (packages starting with
linux-
).
sudo apt remove <package_name>
This should be your last resort. You can try removing the files
associated to the package in question from /var/lib/dpkg/info
.
You need to know a little about basic Linux commands to figure out
what’s happening and how can you use the same with your problem.
For example, you had an issue with polar-bookshelf
. You would look for the
files associated with it:
ls -l /var/lib/dpkg/info | grep -i polar-bookshelf
-rw-r--r-- 1 root root 2324811 Aug 14 19:29 polar-bookshelf.list
-rw-r--r-- 1 root root 2822824 Aug 10 04:28 polar-bookshelf.md5sums
-rwxr-xr-x 1 root root 113 Aug 10 04:28 polar-bookshelf.postinst
-rwxr-xr-x 1 root root 84 Aug 10 04:28 polar-bookshelf.postrm
Now all I needed to do was to remove these files:
sudo mv /var/lib/dpkg/info/polar-bookshelf.* /tmp
Use the sudo apt update
and then you should be able to install software
as usual.
thank you
Just confirmed that macOS instructions still work ! 🗡️
It worked in Ubuntu
Thank you
thank you
Hi there,
I'm using kali linux
I still getting this error while trying to download git :
Sub-process /usr/bin/dpkg returned an error code (1)
what I have to do here??