Setting up an environment for a Binary snapshot of gcc

Ian Bruntlett ian.bruntlett at gmail.com
Thu Jan 22 15:47:27 UTC 2026


Hi,

I have 2 questions about Ubuntu system administration:

*The situation.*
Using Ubuntu 24.04.3 x86_64 LTS
I installed gcc-latest_16.0.0-20260111git8e4107a1b3d4.deb
$ sudo dpkg --install gcc-latest_16.0.0-20260111git8e4107a1b3d4.deb
The .deb file came from https://jwakely.github.io/pkg-gcc-latest/

This prerelease of gcc runs from /opt/gcc-latest/bin so, to get that onto
the PATH, I put these 2 lines at the bottom of .bashrc:
# Things for running gcc-latest
PATH=/opt/gcc-latest/bin:$PATH

*Question 1.*
Is that sensible? With a bit more work I got g++ to compile a simple Hello
World programme - I needed to sudo apt install binutils first.

So that Hello World could find the standard C++ library, I had to source a
shell script which did this:
#!/bin/bash
echo $PATH
set -x
export LD_LIBRARY_PATH=/opt/gcc-latest/lib64

*Question 2.*
Is that sensible? Should I put it in .bashrc as well?

TIA,


Ian

-- 
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://github.com/ian-bruntlett/TECH-Manuals/blob/main/tm-free-software.md
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20260122/75980161/attachment.html>


More information about the ubuntu-users mailing list