Sunday, April 28, 2024
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 16595  / 2 Years ago, thu, january 13, 2022, 6:33:18

I've tried to install git to my laptop which runs lubuntu.I followed the pattern on git website and it says :




To install Git, you need to have the following libraries that Git depends on: curl, zlib, openssl, expat, and libiconv



$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext 
libz-dev libssl-dev



However when I typed it, I got this :



gwapps@gwapps-ThinkPad-X61:~$ sudo apt-get install libcur14-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'zlib1g-dev' instead of 'libz-dev'
E: Unable to locate package libcur14-gnutls-dev
gwapps@gwapps-ThinkPad-X61:~$


Does anyone know what is wrong and what should I do?


More From » installation

 Answers
2

The problem is that there is a typographic error in your installation command. Specifically, you have told apt-get to try to install a package called libcur14-gnutls-dev. But the correct name is libcurl4-gnutls-dev.



That is, you have an l (i.e., a lower-case L) where you should have a 1 (a numeral one). It is (semantically) "lib curl 4," not "lib cur 14".



So run this instead:



sudo apt-get install libcurl4-gnutls-dev


(Also, when installing packages on the command-line, it's advisable to run sudo apt-get update first, unless you have done so recently.)



However, you might not want to install Git this way at all.



The instructions you're following appear to be for compiling Git yourself. That's a perfectly valid thing to do, but for most people it's a lot of unnecessary work, plus if you do that, the system will not be able to upgrade Git automatically when a newer version is available. (It may also, in some ways, have trouble integrating with the installed Git, because the package manager won't "know" it is installed.)'



Therefore, as Tarun suggested, you may just want to install Git directly (Ubuntu has Git packages, which is way faster and simpler!).



sudo apt-get install git-core


Typically you only need to build Git from source yourself if you need a version newer than the version available for Ubuntu. Even in those situations, there are often alternatives, so feel free to let us know more about what you need.


[#29922] Friday, January 14, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
itchlos

Total Points: 486
Total Questions: 115
Total Answers: 110

Location: Macau
Member since Fri, Apr 28, 2023
1 Year ago
;