How to install the latest Git version on Ubuntu 10.10?

1,353

Solution 1

Debian and Ubuntu often do no track the absolutely latest minor revision of a package that is actively developed unless there are significant feature fixes or security updates (and even in the even of such changes they will often backport the update for the significant change to the revision they do carry rather than picking up a whole new revision. This is particularly true of Debian/Stable and Ubuntu/Released in general and Debian/Testing and Ubuntu/Next close to release time (when they are in a "feature freeze" state).

To get a later version you have a few options:

  1. Take the risk of using the later release of the distribution (i.e. Debian/Testing or Ubuntu/Next - Squeeze and Natty respectively at the moment) even though it is still officially in testing. This is not generally recommended, especially for production environments.
  2. Use Apt Pinning (see https://help.ubuntu.com/community/PinningHowto) to take just the packages you want from the later revision while keeping the rest of your system at the current stable/released level. This is less trouble-prone and option 1. You may still need to do a compile step if LibC has been updated significantly between the releases, but this is still easier than using the upstream source as you get the Debian/Ubuntu tweaked version (they sometimes tweak initscripts and related utility parts to better fit with the rest of their system layout and chosen standard tools) and apt/aptitude can bring down updated source for you when there are updates in the repository.
  3. Compile from the upstream sources as honk suggests. This will get you the latest and greatest stable (or bleeding edge beta/alpha) version, but it more effort at the outset and the onus will be on you to monitor the project for security updates and other reasons to need to recompile.

Ubuntu/Natty currently carries 1.7.2.3-2 (which probably means "1.7.2.3 with at least two back-ported updates from later revisions"), the same as Debian/Queeze.

You could also try the version from Debian/Sid (though this is currently the same version) but this is not recommended. "Unstable" is given that name for a reason - packages may be broken at any given time as it exists specifically to find significant breakages before packages are promoted to Testing.

Solution 2

A way likely to work would be downloading from upstream and running the usual

$ autoreconf
$ ./configure --prefix=/PATH/WHERE/YOU/PUT/YOUR/STUFF
$ make install

inside the unpacked source directory.

EDIT

Since in your edit you now explicitly write that you do not want to build from source and want 1.7.3 tagged on 2010/10/21 things look differently.

Ubuntu's git package seems to come directly from Debian's and Debian just migrated 1.7.2.3-2 to TESTING a week ago. You might have some luck with asking for a version bump in the Debian bug tracker, and could directly use that package in Ubuntu then.

Solution 3

After having added following line

deb http://ftp.de.debian.org/debian squeeze main 

to /etc/apt/sources.list I was able to install Git 1.7.2.3 using Synaptic.

Share:
1,353

Related videos on Youtube

user3041736
Author by

user3041736

Updated on September 17, 2022

Comments

  • user3041736
    user3041736 over 1 year

    I want to add '-' or '+' in between words in url. For example url like:

    http://localhost/bollywood/details/23-abhishek-back-from-dubai-holiday.htm
    

    My Route Pattern is

    routes.MapRoute(
                name: "AddExtension",
                url: "{controller}/{action}/{id}-{title}.htm",
                defaults: new { controller = "Bollywood", action = "Details" }
            );
    

    I am creating a link like this on my View:

    @Html.ActionLink(item.n_headline, "Details", new { id = item.News_ID, title = item.n_headline.ToSeoUrl() }, htmlAttributes: null)
    

    My Bollywood controller is here

    public ActionResult Details(int? id, string controller, string action, string title)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            tblBollywood tblbolly = db.tblBollywood.Find(id);
            if (tblbollywood == null)
            {
                return HttpNotFound();
            }
            return View(tblbollywood);
        }
    
    • vtest
      vtest over 13 years
      I wonder why is your question not specifying the reasons why do you want a version of software newer than the one from the official repository.
    • Henk Mollema
      Henk Mollema over 10 years
      What does the current url looks like? What is the content of item.heading and how is it generated?
  • Mike L.
    Mike L. over 13 years
    I'm lazy and prefer the usual installer way. Why there is such a nice package manager on Ubuntu Linux when I need to build from sources? For each and every application which is installed by default I get updates, but why not for Git?
  • akid
    akid over 13 years
    You get updates for git too, and just like for each and every other application it takes a while until the latest release finds it's way into the repositories.
  • Honza Hála
    Honza Hála over 13 years
    you should be careful with adding "testing" sources to sources.list -> it is better to install from source instead.
  • user3041736
    user3041736 over 10 years
    where I have to add this function either in controller class or else any where ?
  • Sirwan Afifi
    Sirwan Afifi over 10 years
    you can create a class called helper in your application.
  • user3041736
    user3041736 over 10 years
    How do i call the Html Helper method from my controller method? Simply using the static class HtmlHelper does not work.
  • Sirwan Afifi
    Sirwan Afifi over 10 years
    you should use your helper class in your view not controller.
  • user3041736
    user3041736 over 10 years
    Thank you its working..but by doing that I get another problem "The request for page is bad request" and I am searching a record by ID not pagename then also I get the same problem
  • user3041736
    user3041736 over 10 years
    @Html.ActionLink(item.n_headline, "Details", new { id = item.News_ID, title = Html.ToSeoUrl(item.n_headline) }, htmlAttributes: null) its not working but if i simpley pass (item.n_headline) to that actionlink then the requested page is shown
  • user3041736
    user3041736 over 10 years
    By doing this its working '-' is added to url but by doing that the ID parameter goes null
  • Sirwan Afifi
    Sirwan Afifi over 10 years
    did you set Id = item.Id ?
  • user3041736
    user3041736 over 10 years
    yes sir..and when I click on that link url is shown in correct format that same I want but the requested page is not shown and the error is..ID parameter has null value
  • user3041736
    user3041736 over 10 years
    Is it necessary to make some changes in web.config file ??
  • Sirwan Afifi
    Sirwan Afifi over 10 years
    no, just make sure that having Id in your action method as parameter.
  • user3041736
    user3041736 over 10 years
    Look this one is my actionLink @Html.ActionLink(item.n_headline, "Details", new { id = item.News_ID, title = item.n_headline.ToSeoUrl() }, htmlAttributes: null)
  • user3041736
    user3041736 over 10 years
    I think that if we are putting '-' or '+' in urls then IIS server do not redirect to a requested page
  • Sirwan Afifi
    Sirwan Afifi over 10 years
    I tested my answer, there is no problem.