I follow the steps in Upgrade Git version on Ubuntu 14.04, but when I enter the first step command: sudo add-apt-repository ppa:git-core/ppa
, I receive the following error:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/apt/sources.list.d/git-core-ppa-trusty.list'
you can check the following picture for detail:
With this error, when I continue to enter the remaining 2 commands, I failed to upgrade my git version. Hope someone know this problem can help me out, thank you.
Your initial error (the Python FileNotFoundError
) is most likely caused because the directory /etc/apt/sources.list.d
inside which add-apt-repository
tries to create a sources file does not exist, for whatever obscure reason.
To fix this, simply create this directory manually with e.g. this command:
sudo mkdir /etc/apt/sources.list.d
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments