I have ubuntu 17.10. gcc version 7.2.0 (Ubuntu 7.2.0-8ubuntu3.2)
I have to get GCC 5.4. I've tried:
sudo apt-get install gcc-5.4
sudo apt-get install gcc-5.4 g++-5.4
But i'm receiving :
E: Unable to locate package gcc-5.4
E: Couldn't find any package by glob 'gcc-5.4'
E: Couldn't find any package by regex 'gcc-5.4'
At apt-get install gcc
I receive
gcc is already the newest version (4:7.2.0-1ubuntu1).
I have to downgrade to 5.4,
How can I solve it? Thanks
答案 0 :(得分:2)
You can go to the packages.ubuntu.com page for gcc-5 and you will see that eg xenial still has it: https://packages.ubuntu.com/xenial/gcc-5
Now it may just be a matter of adding the xenial repo info back into /etc/sources.list
(or maybe /etc/sources.list.d/xenial.conf
to easily uncomment later), run apt-get update
and apt-get install gcc-5
.
Another alternative is to use Docker and just run in a xenial container...
答案 1 :(得分:-2)
我努力
https://packages.ubuntu.com/bionic/amd64/gcc-5/download
在
/etc/apt/sources.list
deb http://cz.archive.ubuntu.com/ubuntu仿生主宇宙