Score:0

Problem in installing GCC (G++) 5 in ubuntu 22.04

it flag

I needed gcc 5 on my ubuntu 22.04. I tried using "sudo apt-get install gcc-5 g++-5" but this output is coming:

sudo apt-get install gcc-5 g++5
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'librust-encoding-rs-0+fast-big5-hanzi-encode-dev' for regex 'g++5'
Note, selecting 'librust-encoding-rs+less-slow-big5-hanzi-encode-dev' for regex 'g++5'
Note, selecting 'libonig5' for regex 'g++5'
Note, selecting 'libini-config5' for regex 'g++5'
Note, selecting 'libsuitesparseconfig5' for regex 'g++5'
Note, selecting 'libkf5plotting5' for regex 'g++5'
Note, selecting 'libqt5positioning5' for regex 'g++5'
Note, selecting 'librlog5v5' for regex 'g++5'
Note, selecting 'libkf5notifyconfig5' for regex 'g++5'
Note, selecting 'libapt-pkg5.0' for regex 'g++5'
Note, selecting 'qtpositioning5-examples' for regex 'g++5'
Note, selecting 'librust-encoding-rs-0.8+less-slow-big5-hanzi-encode-dev' for regex 'g++5'
Note, selecting 'liboxygenstyleconfig5-5' for regex 'g++5'
Note, selecting 'librust-encoding-rs-0.8.22+less-slow-big5-hanzi-encode-dev' for regex 'g++5'
Note, selecting 'librust-encoding-rs-0.8.22+fast-big5-hanzi-encode-dev' for regex 'g++5'
Note, selecting 'libnanomsg5' for regex 'g++5'
Note, selecting 'liballegro-dialog5.2' for regex 'g++5'
Note, selecting 'libinotify-ocaml-dev-zqg59' for regex 'g++5'
Note, selecting 'libkf5syntaxhighlighting5' for regex 'g++5'
Note, selecting 'qtpositioning5-dev' for regex 'g++5'
Note, selecting 'qtpositioning5-doc' for regex 'g++5'
Note, selecting 'qtsvg5-doc-html' for regex 'g++5'
Note, selecting 'libqt5svg5' for regex 'g++5'
Note, selecting 'qtsvg5-doc' for regex 'g++5'
Note, selecting 'qtpositioning5-doc-html' for regex 'g++5'
Note, selecting 'libkf5akonadisearchdebug5' for regex 'g++5'
Note, selecting 'librust-encoding-rs+fast-big5-hanzi-encode-dev' for regex 'g++5'
Note, selecting 'liballegro-dialog5-dev' for regex 'g++5'
Note, selecting 'libqt5svg5-dev' for regex 'g++5'
Note, selecting 'libroot-montecarlo-eg5.34' for regex 'g++5'
Note, selecting 'libinotify-ocaml-zqg59' for regex 'g++5'
Note, selecting 'librlog5' for regex 'g++5'
Note, selecting 'libipmimonitoring5a' for regex 'g++5'
Note, selecting 'libqt5positioning5-plugins' for regex 'g++5'
Note, selecting 'librust-encoding-rs-0.8+fast-big5-hanzi-encode-dev' for regex 'g++5'
Note, selecting 'qtsvg5-examples' for regex 'g++5'
Note, selecting 'librust-encoding-rs-0+less-slow-big5-hanzi-encode-dev' for regex 'g++5'
Note, selecting 'libinotify-ocaml' instead of 'libinotify-ocaml-zqg59'
Note, selecting 'libinotify-ocaml-dev' instead of 'libinotify-ocaml-dev-zqg59'
Note, selecting 'librust-encoding-rs-dev' instead of 'librust-encoding-rs+fast-big5-hanzi-encode-dev'
Note, selecting 'librust-encoding-rs-dev' instead of 'librust-encoding-rs+less-slow-big5-hanzi-encode-dev'
Note, selecting 'librust-encoding-rs-dev' instead of 'librust-encoding-rs-0+fast-big5-hanzi-encode-dev'
Note, selecting 'librust-encoding-rs-dev' instead of 'librust-encoding-rs-0+less-slow-big5-hanzi-encode-dev'
Note, selecting 'librust-encoding-rs-dev' instead of 'librust-encoding-rs-0.8+fast-big5-hanzi-encode-dev'
Note, selecting 'librust-encoding-rs-dev' instead of 'librust-encoding-rs-0.8+less-slow-big5-hanzi-encode-dev'
Note, selecting 'librust-encoding-rs-dev' instead of 'librust-encoding-rs-0.8.22+fast-big5-hanzi-encode-dev'
Note, selecting 'librust-encoding-rs-dev' instead of 'librust-encoding-rs-0.8.22+less-slow-big5-hanzi-encode-dev'


E: Unable to locate package gcc-5

Now what does last line indicate ...any solution. I have already added the repository using "sudo add-apt-repository ppa:ubuntu-toolchain-r/test" and have done sudo update. It still is showing same result.

guiverc avatar
cn flag
`gcc-5` is *deprecated* and was available for releases up to 18.04 (*bionic*) in Ubuntu repositories.
Anirudh avatar
it flag
Thank you guiverc....should i install gcc 7 then?
Hannu avatar
ca flag
What do you see as output from `$ gcc --version` ? - isn't that suitable? What kind of project would not work with it? You might need `$ sudo apt install build-essential ` though.
guiverc avatar
cn flag
Why not just install the default version; ie. `sudo apt install gcc` will install `gcc | 4:11.2.0-1ubuntu1 | jammy | amd64, arm64, armhf, i386, ppc64el, riscv64, s390x` ( https://packages.ubuntu.com/jammy/gcc ) ie. gcc 11
Anirudh avatar
it flag
I need gcc5 and this will give gcc11.2.0.......guiverc
Anirudh avatar
it flag
version 11.2 is not suitable....i need 5 version.....build essential is required in later stages.......Hannu
guiverc avatar
cn flag
gcc-7 is likewise *deprecated*, but was last available on 20.04 (`gcc-7 | 7.5.0-6ubuntu2 | focal/universe | source, amd64, arm64, armhf, ppc64el, s390x`) Use *focal* (20.04) on a VM for your compiles maybe...
Anirudh avatar
it flag
Thank you guiverc
Anirudh avatar
it flag
Hi friends this is what I found: I tried a lot guys....gcc5 cannot be installed on ubuntu...but gcc7 .5 can be installed. For gcc5 you have to install ubuntu 18 bionic
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.