3

I need to download and install g++4.9 in order to work with regex in c++11 for a school project. I downloaded the source but it seems it does not work .. I searched for the rpm and 1-ClickInstall and everything I find seems not to work. So I'm here looking for a solution. How can I install g++4.9 on OpenSuse 13.1 ?

Thanks !

  • g++4.8 doesn't support regex. – Nicolas Charvoz Apr 21 '15 at 10:20
  • What went wrong when you tried to use the gcc 4.9 source? – Stephen Kitt Apr 21 '15 at 10:21
  • Also, what RPMs did you try? – Stephen Kitt Apr 21 '15 at 10:24
  • @StephenKitt I did the mkdir objdir , cd objdir, ../gcc4.9.2/configure, make, sudo make install, but g++4.9 is not found, I'm trying to recompile it again after having my pc reinstalled. About the RPM I did not find any for openSuse, I tried one for an other linux but it asks for dependency .. – Nicolas Charvoz Apr 21 '15 at 10:26
  • When building from source you may just end up with g++, not g++4.9 (and it would be g++-4.9 anyway). If your rebuild doesn't work, you could always try the OpenSuse 13.2 RPMs from rpmfind.net//linux/RPM/opensuse/13.2/x86_64/… (and their dependencies as necessary)... – Stephen Kitt Apr 21 '15 at 10:29
1

openSUSE has some "extended" repositories, that include various tools (gcc-4.9 and gcc-5.0 beta are there).

From root shell add repository and enable it:

# zypper ar http://download.opensuse.org/repositories/devel:/gcc/openSUSE_13.1/ devel-gcc

Refresh repository cached metadata:

# zypper ref

Install g++ 4.9

# zypper in gcc49-c++

To use it, explicitly compile with g++-4.9


Check other packages at http://software.opensuse.org/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.