gcc-11 for Ubuntu 24.04.6 on WSL2


prusso

New member
Local time
8:07 PM
Posts
3
OS
Windows 11 Pro
Is there a possibility to install gcc-11 for WSL2 version of Ubuntu 22.04.6. So far I tried apt update, apt upgrade and sudo apt install gcc-11. No luck yet there. I am running so far at this time Windows 11 Pro with WSL2 installed with the kernel update.

Is there a possibility to install gcc-11 for WSL2 version of Ubuntu 22.04.6?
 
Windows Build/Version
22621.1848

My Computer My Computer

At a glance

Windows 11 Pro
OS
Windows 11 Pro
If your way did not work, then try a different repository
Code:
sudo apt update && sudo apt upgrade
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y
sudo apt install -y gcc-11
gcc-11 --version
 

My Computers My Computers

  • At a glance

    Windows 11AMD Ryzen 5 560016 GBSapphire Radeon RX 6500XT (8 GB version)
    OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 5600
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB
    Graphics Card(s)
    Sapphire Radeon RX 6500XT (8 GB version)
    Monitor(s) Displays
    BenQ Mobuiz EX2710Q QHD, Iiyama ProLite X23377HDS
    Hard Drives
    MSI Spatium M461 4TB
  • At a glance

    Windows 11Intel Celeron N4020
    Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Acer A114
    CPU
    Intel Celeron N4020
Code:
prusso@SurfacePro8:~/gcc-11$ sudo apt update && sudo apt upgrade
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
prusso@SurfacePro8:~/gcc-11$ sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:3 http://ppa.launchpad.net/ubuntu-toolchain-r/ppa/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Reading package lists... Done
prusso@SurfacePro8:~/gcc-11$ sudo apt install -y gcc-11
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gcc-11


I tried after that to apt update apt upgrade. So far I have an unable to locate package?
 

My Computer My Computer

At a glance

Windows 11 Pro
OS
Windows 11 Pro
Are you sure that Ubuntu 22.04.6 is installed?
 

My Computers My Computers

  • At a glance

    Windows 11AMD Ryzen 5 560016 GBSapphire Radeon RX 6500XT (8 GB version)
    OS
    Windows 11
    Computer type
    PC/Desktop
    CPU
    AMD Ryzen 5 5600
    Motherboard
    MSI B550-A Pro
    Memory
    16 GB
    Graphics Card(s)
    Sapphire Radeon RX 6500XT (8 GB version)
    Monitor(s) Displays
    BenQ Mobuiz EX2710Q QHD, Iiyama ProLite X23377HDS
    Hard Drives
    MSI Spatium M461 4TB
  • At a glance

    Windows 11Intel Celeron N4020
    Operating System
    Windows 11
    Computer type
    Laptop
    Manufacturer/Model
    Acer A114
    CPU
    Intel Celeron N4020
I think so. I feel pretty sure so from the Microsoft store that is what is showing up in start menu that I had chosen it. 😵‍💫
 

My Computer My Computer

At a glance

Windows 11 Pro
OS
Windows 11 Pro
If your way did not work, then try a different repository
Code:
sudo apt update && sudo apt upgrade
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa -y
sudo apt install -y gcc-11
gcc-11 --version
change the toolchain-r/ppa to toolchain-r/test

This worked in a Native ubuntu install --should also work AFAIK on WSL.

Cheers
jimbo
 

My Computer My Computer

At a glance

Windows XP,11 Linux Fedora Rawhide pre-releas...2 X Intel i7
OS
Windows XP,11 Linux Fedora Rawhide pre-release 45
Computer type
PC/Desktop
CPU
2 X Intel i7
Screen Resolution
4KUHD X 2
Back
Top Bottom