Downgrade GNU Compilers Ubuntu 18.04
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I'm trying to install the HDF5 compression libraries with the Intel Compilers suite (Intel Parallel Studio XE 2018.2.046).
With the same suite I've compiled both szip and zlib and I'm proceeding to configure HDF with the command:
./configure --prefix=/home/modelstation/Software/Intel_Compiled/hdf5 --enable-fortran --enable-cxx --with-szip=/home/modelstation/Software/Intel_Compiled/szip --with-zlib=/home/modelstation/Software/Intel_Compiled/zlib
Configuration stops with the error:
checking size of size_t... configure: error: in `/home/modelstation/Downloads/hdf5-1.10.2':
configure: error: cannot compute sizeof (size_t)
Following this solution on the Intel Developer forum it seems that it should be possible to circumvent this error (which is apparently due to a conflict between HDF5 configure scripts and the new shiny Ubuntu version) by downgrading the GNU compiler suite used in autotools with the commands:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-6
But that command produces the following error:
update-alternatives: error: alternative path /usr/bin/gcc-6 doesn't exist
I thought that the mistake was that I had to actually install some previous version of the packages before updating alternatives, therefore I tried:
sudo apt-get install gcc-4.6
But the result is:
Package gcc-4.6 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 source
However the following packages replace it:
cpp-4.8 cpp-4.8:i386
E: Package 'gcc-4.6' has no installation candidate
So is it possible under ubuntu 18.04 to downgrade gcc g++ and gfortran to version 4.6 or not?
If the answer is "no" I will have to format everything and install Ubuntu 16.04, in which none of these issues existed.
Thanks
gcc downgrade
 |Â
show 2 more comments
up vote
0
down vote
favorite
I'm trying to install the HDF5 compression libraries with the Intel Compilers suite (Intel Parallel Studio XE 2018.2.046).
With the same suite I've compiled both szip and zlib and I'm proceeding to configure HDF with the command:
./configure --prefix=/home/modelstation/Software/Intel_Compiled/hdf5 --enable-fortran --enable-cxx --with-szip=/home/modelstation/Software/Intel_Compiled/szip --with-zlib=/home/modelstation/Software/Intel_Compiled/zlib
Configuration stops with the error:
checking size of size_t... configure: error: in `/home/modelstation/Downloads/hdf5-1.10.2':
configure: error: cannot compute sizeof (size_t)
Following this solution on the Intel Developer forum it seems that it should be possible to circumvent this error (which is apparently due to a conflict between HDF5 configure scripts and the new shiny Ubuntu version) by downgrading the GNU compiler suite used in autotools with the commands:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-6
But that command produces the following error:
update-alternatives: error: alternative path /usr/bin/gcc-6 doesn't exist
I thought that the mistake was that I had to actually install some previous version of the packages before updating alternatives, therefore I tried:
sudo apt-get install gcc-4.6
But the result is:
Package gcc-4.6 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 source
However the following packages replace it:
cpp-4.8 cpp-4.8:i386
E: Package 'gcc-4.6' has no installation candidate
So is it possible under ubuntu 18.04 to downgrade gcc g++ and gfortran to version 4.6 or not?
If the answer is "no" I will have to format everything and install Ubuntu 16.04, in which none of these issues existed.
Thanks
gcc downgrade
You can't downgrade easily. Downgrading would also downgrade all your libraries and break 18.04.
â Thomas Wardâ¦
May 24 at 14:27
But isn't exactly update-alternatives aim? Or am I wrong?
â Mutewinter
May 24 at 14:29
2
gcc-6
?gcc-4.6
? Which is it?
â muru
May 24 at 14:42
1
»» alternative path /usr/bin/gcc-6 doesn't exist «« :sudo apt install g++-6
â Knud Larsen
May 24 at 15:23
1
You probably don't even need to mess withupdate-alternatives
- just setCC=/usr/bin/gcc-6
(or whatever) in the./configure
command.
â steeldriver
May 24 at 15:25
 |Â
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to install the HDF5 compression libraries with the Intel Compilers suite (Intel Parallel Studio XE 2018.2.046).
With the same suite I've compiled both szip and zlib and I'm proceeding to configure HDF with the command:
./configure --prefix=/home/modelstation/Software/Intel_Compiled/hdf5 --enable-fortran --enable-cxx --with-szip=/home/modelstation/Software/Intel_Compiled/szip --with-zlib=/home/modelstation/Software/Intel_Compiled/zlib
Configuration stops with the error:
checking size of size_t... configure: error: in `/home/modelstation/Downloads/hdf5-1.10.2':
configure: error: cannot compute sizeof (size_t)
Following this solution on the Intel Developer forum it seems that it should be possible to circumvent this error (which is apparently due to a conflict between HDF5 configure scripts and the new shiny Ubuntu version) by downgrading the GNU compiler suite used in autotools with the commands:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-6
But that command produces the following error:
update-alternatives: error: alternative path /usr/bin/gcc-6 doesn't exist
I thought that the mistake was that I had to actually install some previous version of the packages before updating alternatives, therefore I tried:
sudo apt-get install gcc-4.6
But the result is:
Package gcc-4.6 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 source
However the following packages replace it:
cpp-4.8 cpp-4.8:i386
E: Package 'gcc-4.6' has no installation candidate
So is it possible under ubuntu 18.04 to downgrade gcc g++ and gfortran to version 4.6 or not?
If the answer is "no" I will have to format everything and install Ubuntu 16.04, in which none of these issues existed.
Thanks
gcc downgrade
I'm trying to install the HDF5 compression libraries with the Intel Compilers suite (Intel Parallel Studio XE 2018.2.046).
With the same suite I've compiled both szip and zlib and I'm proceeding to configure HDF with the command:
./configure --prefix=/home/modelstation/Software/Intel_Compiled/hdf5 --enable-fortran --enable-cxx --with-szip=/home/modelstation/Software/Intel_Compiled/szip --with-zlib=/home/modelstation/Software/Intel_Compiled/zlib
Configuration stops with the error:
checking size of size_t... configure: error: in `/home/modelstation/Downloads/hdf5-1.10.2':
configure: error: cannot compute sizeof (size_t)
Following this solution on the Intel Developer forum it seems that it should be possible to circumvent this error (which is apparently due to a conflict between HDF5 configure scripts and the new shiny Ubuntu version) by downgrading the GNU compiler suite used in autotools with the commands:
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-6
But that command produces the following error:
update-alternatives: error: alternative path /usr/bin/gcc-6 doesn't exist
I thought that the mistake was that I had to actually install some previous version of the packages before updating alternatives, therefore I tried:
sudo apt-get install gcc-4.6
But the result is:
Package gcc-4.6 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 source
However the following packages replace it:
cpp-4.8 cpp-4.8:i386
E: Package 'gcc-4.6' has no installation candidate
So is it possible under ubuntu 18.04 to downgrade gcc g++ and gfortran to version 4.6 or not?
If the answer is "no" I will have to format everything and install Ubuntu 16.04, in which none of these issues existed.
Thanks
gcc downgrade
asked May 24 at 14:16
Mutewinter
318318
318318
You can't downgrade easily. Downgrading would also downgrade all your libraries and break 18.04.
â Thomas Wardâ¦
May 24 at 14:27
But isn't exactly update-alternatives aim? Or am I wrong?
â Mutewinter
May 24 at 14:29
2
gcc-6
?gcc-4.6
? Which is it?
â muru
May 24 at 14:42
1
»» alternative path /usr/bin/gcc-6 doesn't exist «« :sudo apt install g++-6
â Knud Larsen
May 24 at 15:23
1
You probably don't even need to mess withupdate-alternatives
- just setCC=/usr/bin/gcc-6
(or whatever) in the./configure
command.
â steeldriver
May 24 at 15:25
 |Â
show 2 more comments
You can't downgrade easily. Downgrading would also downgrade all your libraries and break 18.04.
â Thomas Wardâ¦
May 24 at 14:27
But isn't exactly update-alternatives aim? Or am I wrong?
â Mutewinter
May 24 at 14:29
2
gcc-6
?gcc-4.6
? Which is it?
â muru
May 24 at 14:42
1
»» alternative path /usr/bin/gcc-6 doesn't exist «« :sudo apt install g++-6
â Knud Larsen
May 24 at 15:23
1
You probably don't even need to mess withupdate-alternatives
- just setCC=/usr/bin/gcc-6
(or whatever) in the./configure
command.
â steeldriver
May 24 at 15:25
You can't downgrade easily. Downgrading would also downgrade all your libraries and break 18.04.
â Thomas Wardâ¦
May 24 at 14:27
You can't downgrade easily. Downgrading would also downgrade all your libraries and break 18.04.
â Thomas Wardâ¦
May 24 at 14:27
But isn't exactly update-alternatives aim? Or am I wrong?
â Mutewinter
May 24 at 14:29
But isn't exactly update-alternatives aim? Or am I wrong?
â Mutewinter
May 24 at 14:29
2
2
gcc-6
? gcc-4.6
? Which is it?â muru
May 24 at 14:42
gcc-6
? gcc-4.6
? Which is it?â muru
May 24 at 14:42
1
1
»» alternative path /usr/bin/gcc-6 doesn't exist «« :
sudo apt install g++-6
â Knud Larsen
May 24 at 15:23
»» alternative path /usr/bin/gcc-6 doesn't exist «« :
sudo apt install g++-6
â Knud Larsen
May 24 at 15:23
1
1
You probably don't even need to mess with
update-alternatives
- just set CC=/usr/bin/gcc-6
(or whatever) in the ./configure
command.â steeldriver
May 24 at 15:25
You probably don't even need to mess with
update-alternatives
- just set CC=/usr/bin/gcc-6
(or whatever) in the ./configure
command.â steeldriver
May 24 at 15:25
 |Â
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
update-alternatives
gives you the convenience of switching between different installed gcc versions. Downgrading the system gcc is almost never needed, and is generally harmful.
The error /usr/bin/gcc-6 doesn't exist
from update-alternatives
suggests that gcc-6
is not installed, so all you need is to install the following packages (which are found in the default 18.04 repository, bionic/universe
):
sudo apt-get install gcc-6 g++-6 g++-6-multilib gfortran-6
Then, repeat the sudo update-alternatives --install
step for each gcc version you wish to use.
Whenever you want to change back gcc
to point to the default version shipped with Bionic, 7.3, simply run sudo update-alternatives --config gcc
, which will let you pick between the available gcc versions with installed alternatives.
Also, you can always run a specific gcc version directly, by specifying the version suffix (gcc-6
, gcc-7
, etc).
update-alternatives --config gcc update-alternatives: error: no alternatives for gcc
â Jiang YD
Aug 20 at 6:08
@JiangYD The alternatives need to be installed first, using thesudo update-alternatives --install
step described in the question, and repeated for each gcc version - I edited my answer hoping to clarify
â valiano
Aug 21 at 9:38
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
update-alternatives
gives you the convenience of switching between different installed gcc versions. Downgrading the system gcc is almost never needed, and is generally harmful.
The error /usr/bin/gcc-6 doesn't exist
from update-alternatives
suggests that gcc-6
is not installed, so all you need is to install the following packages (which are found in the default 18.04 repository, bionic/universe
):
sudo apt-get install gcc-6 g++-6 g++-6-multilib gfortran-6
Then, repeat the sudo update-alternatives --install
step for each gcc version you wish to use.
Whenever you want to change back gcc
to point to the default version shipped with Bionic, 7.3, simply run sudo update-alternatives --config gcc
, which will let you pick between the available gcc versions with installed alternatives.
Also, you can always run a specific gcc version directly, by specifying the version suffix (gcc-6
, gcc-7
, etc).
update-alternatives --config gcc update-alternatives: error: no alternatives for gcc
â Jiang YD
Aug 20 at 6:08
@JiangYD The alternatives need to be installed first, using thesudo update-alternatives --install
step described in the question, and repeated for each gcc version - I edited my answer hoping to clarify
â valiano
Aug 21 at 9:38
add a comment |Â
up vote
0
down vote
accepted
update-alternatives
gives you the convenience of switching between different installed gcc versions. Downgrading the system gcc is almost never needed, and is generally harmful.
The error /usr/bin/gcc-6 doesn't exist
from update-alternatives
suggests that gcc-6
is not installed, so all you need is to install the following packages (which are found in the default 18.04 repository, bionic/universe
):
sudo apt-get install gcc-6 g++-6 g++-6-multilib gfortran-6
Then, repeat the sudo update-alternatives --install
step for each gcc version you wish to use.
Whenever you want to change back gcc
to point to the default version shipped with Bionic, 7.3, simply run sudo update-alternatives --config gcc
, which will let you pick between the available gcc versions with installed alternatives.
Also, you can always run a specific gcc version directly, by specifying the version suffix (gcc-6
, gcc-7
, etc).
update-alternatives --config gcc update-alternatives: error: no alternatives for gcc
â Jiang YD
Aug 20 at 6:08
@JiangYD The alternatives need to be installed first, using thesudo update-alternatives --install
step described in the question, and repeated for each gcc version - I edited my answer hoping to clarify
â valiano
Aug 21 at 9:38
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
update-alternatives
gives you the convenience of switching between different installed gcc versions. Downgrading the system gcc is almost never needed, and is generally harmful.
The error /usr/bin/gcc-6 doesn't exist
from update-alternatives
suggests that gcc-6
is not installed, so all you need is to install the following packages (which are found in the default 18.04 repository, bionic/universe
):
sudo apt-get install gcc-6 g++-6 g++-6-multilib gfortran-6
Then, repeat the sudo update-alternatives --install
step for each gcc version you wish to use.
Whenever you want to change back gcc
to point to the default version shipped with Bionic, 7.3, simply run sudo update-alternatives --config gcc
, which will let you pick between the available gcc versions with installed alternatives.
Also, you can always run a specific gcc version directly, by specifying the version suffix (gcc-6
, gcc-7
, etc).
update-alternatives
gives you the convenience of switching between different installed gcc versions. Downgrading the system gcc is almost never needed, and is generally harmful.
The error /usr/bin/gcc-6 doesn't exist
from update-alternatives
suggests that gcc-6
is not installed, so all you need is to install the following packages (which are found in the default 18.04 repository, bionic/universe
):
sudo apt-get install gcc-6 g++-6 g++-6-multilib gfortran-6
Then, repeat the sudo update-alternatives --install
step for each gcc version you wish to use.
Whenever you want to change back gcc
to point to the default version shipped with Bionic, 7.3, simply run sudo update-alternatives --config gcc
, which will let you pick between the available gcc versions with installed alternatives.
Also, you can always run a specific gcc version directly, by specifying the version suffix (gcc-6
, gcc-7
, etc).
edited Aug 21 at 9:29
answered May 24 at 17:26
valiano
744312
744312
update-alternatives --config gcc update-alternatives: error: no alternatives for gcc
â Jiang YD
Aug 20 at 6:08
@JiangYD The alternatives need to be installed first, using thesudo update-alternatives --install
step described in the question, and repeated for each gcc version - I edited my answer hoping to clarify
â valiano
Aug 21 at 9:38
add a comment |Â
update-alternatives --config gcc update-alternatives: error: no alternatives for gcc
â Jiang YD
Aug 20 at 6:08
@JiangYD The alternatives need to be installed first, using thesudo update-alternatives --install
step described in the question, and repeated for each gcc version - I edited my answer hoping to clarify
â valiano
Aug 21 at 9:38
update-alternatives --config gcc update-alternatives: error: no alternatives for gcc
â Jiang YD
Aug 20 at 6:08
update-alternatives --config gcc update-alternatives: error: no alternatives for gcc
â Jiang YD
Aug 20 at 6:08
@JiangYD The alternatives need to be installed first, using the
sudo update-alternatives --install
step described in the question, and repeated for each gcc version - I edited my answer hoping to clarifyâ valiano
Aug 21 at 9:38
@JiangYD The alternatives need to be installed first, using the
sudo update-alternatives --install
step described in the question, and repeated for each gcc version - I edited my answer hoping to clarifyâ valiano
Aug 21 at 9:38
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1039856%2fdowngrade-gnu-compilers-ubuntu-18-04%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You can't downgrade easily. Downgrading would also downgrade all your libraries and break 18.04.
â Thomas Wardâ¦
May 24 at 14:27
But isn't exactly update-alternatives aim? Or am I wrong?
â Mutewinter
May 24 at 14:29
2
gcc-6
?gcc-4.6
? Which is it?â muru
May 24 at 14:42
1
»» alternative path /usr/bin/gcc-6 doesn't exist «« :
sudo apt install g++-6
â Knud Larsen
May 24 at 15:23
1
You probably don't even need to mess with
update-alternatives
- just setCC=/usr/bin/gcc-6
(or whatever) in the./configure
command.â steeldriver
May 24 at 15:25