Thursday, May 2, 2024
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 821  / 2 Years ago, mon, august 22, 2022, 5:50:08

In Ubuntu LTS, applications are locked to the version fixed to the release date. For Ubuntu 22.04 "Jammy" those are:



I would like to install the latest upstream versions of these applications on my home server.


How can I do this in an easy and reliable way?


More From » command-line

 Answers
5

This can be done in at least two ways (the Snap way and the Debian way) - but I greatly prefer the Debian method. It's also possible to mix and match of you prefer, and install some apps with Snap, and some with Debian packages.


Please note that neither of these methods are recommended for production use, but both should be perfectly suitable for home use.


The Snap Way

This method will give you updated versions of apps, provided there is a Snap maintainer that regularly updates the packages. Unfortunately, this is not always the case. Another benefit is that apps auto-update with new releases.


Some popular command-line apps are available as Snap packages.



  • nano (seems abandoned since June 2021)

  • htop (maintained, updated June 2022)

  • tmux (last updated February 2022)

  • lnav (last updated November 2021)


Each of these apps can be installed from the command line:



  • nano: (not recommended at the moment, since the snap seems abandoned)


    sudo snap install nano --classic


  • htop:


    sudo snap install htop
    sudo snap connect htop:mount-observe
    sudo snap connect htop:network-control


  • tmux:


    sudo snap install tmux-non-dead --classic


  • lnav:


    sudo snap install lnav



If you choose to do so, remove the corresponding Debian packages:


sudo apt remove nano htop tmux lnav

My own experience with these Snap packages are somewhat mixed, which is why I choose the Debian method described below. Examples of problems I experienced:



  • nano suddenly stopped working

  • tmux was suddenly "updated" to a version more than a 1,5 years old (v 2.7)

  • htop manpages was missing completely


Another general issue with snaps is that the manpages are not easily available - it requires a dirty hack to even get them working.


The Debian Way

This method will give you updated versions of apps, provided there is a Debian maintainer that regularly updates the packages. This is usually the case. In this scenario, you have to manually update the packages with each new release. Also, since Debian and Ubuntu are not 1:1 binary compatible, issues may in rare occasions arise from this method. Always try on a VM first!


With this method, you install updated versions directly from the Debian testing or unstable branches. This is somewhat experimental, but should still be safe for home use - and rather easy to rollback to a previous version in any case. I've done this for over 2 years without any problems whatsoever. The only drawback is that you have to manually update the applications installed in this way.


First, you locate the applications in the Debian Sid branch (usually has the latest packages):



Then, for each package check that the dependencies are actually compatible with your Ubuntu version. They usually are - but in the very end of the Ubuntu LTS cycle, there may be some cases where Debian uses a newer version of a library than Ubuntu - pay attention to this.


Now, create a directory, and download the correct version of each package (here for amd64 architecture, version of 2022.12.20):


wget  
http://ftp.de.debian.org/debian/pool/main/n/nano/nano_7.1-1_amd64.deb
http://ftp.de.debian.org/debian/pool/main/h/htop/htop_3.2.1-1_amd64.deb
http://ftp.de.debian.org/debian/pool/main/t/tmux/tmux_3.3a-3_amd64.deb
http://ftp.de.debian.org/debian/pool/main/l/lnav/lnav_0.11.1-1_amd64.deb

Finally, install the packages from these files (version of 2022.12.20): (I usually test the installation on a VM first, before I install on a physical server)


sudo apt install  
./nano_7.1-1_amd64.deb
./htop_3.2.1-1_amd64.deb
./tmux_3.3a-3_amd64.deb
./lnav_0.11.1-1_amd64.deb

Now you have the latest upstream versions of these applications installed. Please be careful to check the configuration files after each upgrade, since there can be changes in syntax etc. that needs to be fixed.


For the advanced user, you could create a script that monitors new versions of these Debian packages, and send you an alert when this is the case.


[#100] Tuesday, August 23, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
edseager

Total Points: 185
Total Questions: 105
Total Answers: 102

Location: Angola
Member since Wed, Apr 13, 2022
2 Years ago
;