I need gcc-4.2 on Ubuntu Trusty.
Building gcc 4.2 is not an option so I need to get it through a repository(it's part of a Travis CI build for project mutator so I can't really build it).
I looked around and apparently Hardy(deb hardy universe) used to have that so I figured I just need to add that to the apt list but I get this:
Package gcc-4.2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another sourceSo I looked around some more and couldn't find another repo with that package.
Any ideas?
1 Answer
The difference between Hardy and Trusty is quite big. Too big to do so-called apt-pinning.
It seems to me that the easiest and cleanest solution is to install Hardy in a Virtual Machine, and install gcc 4.2 there.
For example, after downloading the Hardy iso image and installing Qemu/KVM. Assuming you can run KVM (Otherwise just run plain Qemu or use VirtualBox) :
qemu-img -f qcow2 hardy-hdd.qcow2 15G
kvm -hda hardy-hdd.qcow2 -cdrom ubuntu-8.04-desktop-amd64.iso -boot d -m 1024 The first line created a virtual hard disk of 15 Gb called hardy-hdd.qcow2
The second line boots up the iso cdrom image, in order to install Ubuntu Hardy in the virtual hdd.