-2

I installed ubuntu for the primary purpose of programming but turns out, many things (compilers, interpreters, etc...) are not the latest version in the Ubuntu Packages Database ready for installation.

Such as, if I wanted to install Python on my computer, I would do:

sudo apt update
apt search python

and do sudo apt install for the latest version of python listed in the search result. But turns out, the latest version of Python is not there and also not in the Ubuntu Packages Search.

If I wanted to install GCC, I would do the above, but it simply does not have the latest version. The preinstalled FireFox is also not the latest version.

I know I can just simply build from source, but building GCC from source is too hard for me, for example, I have to install a lot of libraries for GCC to work and I don't know what is the ISO C++11 compiler which is mandatory for this installation, building GCC specifically has me to learn a lot of concepts, such as bootstrapping and configuration, of which I have no experience with whatsoever.

But installing GCC is such a necessity to build other things, and in addition, I need libraries, which some I will be using for building just this one software and never be used ever again but still takes up space in my computer, and removing it is also a maze.

What I am asking as an answer is:

How can I install the latest version of a software without building it or taking up significant space on my computer?

  • Nope, because I want to know how to install the software. I am thinking of improving the title of my question, but I don't know what fits it best. Can you maybe help? – Jimmy Zeng Mar 20 '23 at 09:45
  • You've mention no Ubuntu product/release details so we can only guess as to what packages you are seeing, but you do understand the Stable Release model that Ubuntu uses? with Ubuntu offering various package types & different releases (with upgrade procedures & timings) so you can choose the stability vs latest model that suits you best. – guiverc Mar 20 '23 at 10:17
  • I do not see the latest version of python (3.11.2) in the Ubuntu Packages Search and thus I cannot install it. – Jimmy Zeng Mar 20 '23 at 10:58
  • I've already stated you've provided no Ubuntu product/release details; and Ubuntu uses the Stable Release model for its products, thus release matters. If I type python3 --version I get the answer "Python 3.11.2" for my Ubuntu product/system, but you may not be using the same Ubuntu product that I am, I cannot know as you've provided no details. – guiverc Mar 20 '23 at 11:11
  • Python 3.11.2 will be in Ubuntu 23.04, which is scheduled for release next month. It's currently in pre-release testing. Using the bleeding-edge-newest version of Python will make your software incompatible with older releases of Ubuntu...and most users run older releases of Ubuntu. – user535733 Mar 20 '23 at 13:43

1 Answers1

2

This is not how Ubuntu works, so what you ask isn't directly possible using the traditional packaging system (apt). Please see this thread for an explanation on why Ubuntu doesn't use bleeding edge versions of software.

However, it is possible to distribute newer (and distribution-agnostic) versions of software using one of the alternative packaging systems:

This possibility will depend on individual support by each application you want to install. Also, only Snap allows support for CLI apps.

Since applications packaged this way will have to include all their own versions of libraries, they will take up significantly more space than apt versions, so I'm not sure it's within line of your expectations.

The first example in your question is Python. A simple search here on the site will reveal the following: Never mess with the default Python version on Ubuntu. If you need newer versions of Python, these should be installed in isolated environments.

The second example in your question is Firefox. In recent versions of Ubuntu, Firefox is distributed as a Snap package. However, this comes with both advantages and disadvantages (like slower loading time), so your mileage may vary.

On an interesting side-note, I created a similar topic for a very few select CLI-apps. Maybe some of the solutions there can work for you as well.

So in short: If you want access to the latest versions of applications using a native packaging system or user-level scripts, use a distribution other than Ubuntu.

Artur Meinild
  • 26,018