PDA

View Full Version : SLES 12 Install gcc on SLES 12



dmikhailb
28-Nov-2015, 23:21
I'm having trouble installing gcc on a new SLES 12 box. The goal here is actually to get R Shiny running, but when I try to install any packages I get the below error:


sudo su - -c "R -e \"install.packages('Rcpp',repos='https://cran.rstudio.com/')\""
make: g++: Command not found

This leads me to believe I need to install gcc.


which gcc:

which: no gcc in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/games)


gcc -version:

If 'gcc' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf gcc

This is where the trouble begins. When I
zypper in gcc


Problem: gcc-4.7-7.1.1.x86_64 requires gcc47, but this requirement cannot be provided
uninstallable providers: gcc47-4.7.2_20130108-2.1.6.i586[oss]
gcc47-4.7.2_20130108-2.1.6.x86_64[oss]

OK...

zypper in gcc47-4.7.2_20130108-2.1.6.x86_64

Results:


Problem: gcc47-4.7.2_20130108-2.1.6.x86_64 requires glibc-devel, but this requirement cannot be provided
uninstallable providers: glibc-devel-2.17-4.4.1.i586[oss]
glibc-devel-2.17-4.4.1.x86_64[oss]

Right then...
zypper in glibc-devel

Results:


Problem: glibc-devel-2.17-4.4.1.x86_64 requires glibc = 2.17, but this requirement cannot be provided
uninstallable providers: glibc-2.17-4.4.1.i586[oss]
glibc-2.17-4.4.1.x86_64[oss]


zypper in glibc

Results:
`'glibc' is already installed.

No update candidate for 'glibc-2.19-17.72.x86_64'. The highest available version is already installed.

So somewhere in this chain of dependencies an RPM needs a lower version of something I already have. I don't want to downgrade the system. Is there some way to get the most up to date GCC that will work with glibc-2.19? Am I doing something wrong here? Am I missing a repo?



SLSE12:~ # cat /etc/os-release
NAME="SLES"
VERSION="12"
VERSION_ID="12"
PRETTY_NAME="SUSE Linux Enterprise Server 12"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12"


# zypper lr -u
# | Alias | Name | Enabled | Refresh | URI
--+-----------+-----------+---------+---------+-------------------------------------------------------------------------------
1 | gcc | gcc | Yes | No | http://download.opensuse.org/repositories/devel:/gcc/SLE-12/
2 | oss | oss | Yes | No | http://download.opensuse.org/distribution/12.3/repo/oss/
3 | r-patched | r-patched | Yes | No | http://download.opensuse.org/repositories/deve

jmozdzen
30-Nov-2015, 11:48
Hi dmikhailb,

> Am I doing something wrong here? Am I missing a repo?

mixing SLES12 and OpenSUSE repositories is no good idea, unless you exactly know what you're doing. Was there any specific reason to add the OpenSUSE 12.3 repository and do you have any packages installed from there already? If possible, remove / deactivate that repos once you've cleaned your system from any package from that repos.

I suggest to download the first disk of the SLE SDK 12 and to add that as an "additional product" to your system - it should provide GCC and dependents for you.

Regards,
Jens

smflood
01-Dec-2015, 16:27
On 28/11/2015 22:24, dmikhailb wrote:

> I'm having trouble installing gcc on a new SLES 12 box. The goal here is
> actually to get R Shiny running, but when I try to install any packages
> I get the below error:
>
>
> Code:
> --------------------
> sudo su - -c "R -e \"install.packages('Rcpp',repos='https://cran.rstudio.com/')\""
> make: g++: Command not found
> --------------------
>
>
> This leads me to believe I need to install gcc.
>
> Code:
> --------------------
>
> which gcc:
>
> which: no gcc in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/games)
>
> --------------------
>
>
> Code:
> --------------------
> gcc -version:
>
> If 'gcc' is not a typo you can use command-not-found to lookup the package that contains it, like this:
> cnf gcc
> --------------------
>
>
> This is where the trouble begins. When I
> Code:
> --------------------
> zypper in gcc
> --------------------
>
>
>
> Code:
> --------------------
> Problem: gcc-4.7-7.1.1.x86_64 requires gcc47, but this requirement cannot be provided
> uninstallable providers: gcc47-4.7.2_20130108-2.1.6.i586[oss]
> gcc47-4.7.2_20130108-2.1.6.x86_64[oss]
>
> --------------------
>
> OK...
>
> Code:
> --------------------
> zypper in gcc47-4.7.2_20130108-2.1.6.x86_64
> --------------------
>
>
> Results:
>
>
> Code:
> --------------------
> Problem: gcc47-4.7.2_20130108-2.1.6.x86_64 requires glibc-devel, but this requirement cannot be provided
> uninstallable providers: glibc-devel-2.17-4.4.1.i586[oss]
> glibc-devel-2.17-4.4.1.x86_64[oss]
> --------------------
>
>
> Right then...
> Code:
> --------------------
> zypper in glibc-devel
> --------------------
>
>
> Results:
>
>
> Code:
> --------------------
> Problem: glibc-devel-2.17-4.4.1.x86_64 requires glibc = 2.17, but this requirement cannot be provided
> uninstallable providers: glibc-2.17-4.4.1.i586[oss]
> glibc-2.17-4.4.1.x86_64[oss]
> --------------------
>
>
>
> Code:
> --------------------
> zypper in glibc
> --------------------
>
>
> Results:
> Code:
> --------------------
> `'glibc' is already installed.
>
> No update candidate for 'glibc-2.19-17.72.x86_64'. The highest available version is already installed.
>
> --------------------
>
> So somewhere in this chain of dependencies an RPM needs a lower version
> of something I already have. I don't want to downgrade the system. Is
> there some way to get the most up to date GCC that will work with
> glibc-2.19? Am I doing something wrong here? Am I missing a repo?
>
>
>
> Code:
> --------------------
> SLSE12:~ # cat /etc/os-release
> NAME="SLES"
> VERSION="12"
> VERSION_ID="12"
> PRETTY_NAME="SUSE Linux Enterprise Server 12"
> ID="sles"
> ANSI_COLOR="0;32"
> CPE_NAME="cpe:/o:suse:sles:12"
>
>
> # zypper lr -u
> # | Alias | Name | Enabled | Refresh | URI
> --+-----------+-----------+---------+---------+-------------------------------------------------------------------------------
> 1 | gcc | gcc | Yes | No | http://download.opensuse.org/repositories/devel:/gcc/SLE-12/
> 2 | oss | oss | Yes | No | http://download.opensuse.org/distribution/12.3/repo/oss/
> 3 | r-patched | r-patched | Yes | No | http://download.opensuse.org/repositories/deve
> --------------------

Reposting as original NNTP reply hasn't shown up web-side.

If the above 3 repos are the only ones your server has configured then
it suggests you haven't registered your server against the SUSE Customer
Centre (SCC). If you had of registered against SCC you would find
official packages of gcc 4.8 available from (and supported by) SUSE.
Plus glibc has been updated slightly.

HTH.
--
Simon
SUSE Knowledge Partner

------------------------------------------------------------------------
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
------------------------------------------------------------------------