Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I've recently done something really stupid: I wanted to configure NetCDF libraries using the Intel Fortran compiler and, therefore, I was following instructions for that kind of procedure.

Unfortunately, I've skipped a paragraph and I also accidentally changed my gcc and g++ flags without realizing, since I wrote these lines:

$ export CC=icc 
$ export CXX=icpc 
$ export CFLAGS='-O3 -xT -ip -no-prec-div -static' 
$ export CXXFLAGS='-O3 -xT -ip -no-prec-div -static' 

$ export CPP='icc -E' 
$ export CXXCPP='icpc -E'

The problem is that I do not have the Intel C and C++ compiler (i.e.: icc and icpc) and now, everytime I try to configure NetCDF libraries I end up with a gcc sanity check error.

How can I restore CC, CXX, CFLAGS, CXXFLAGS, CPP and CXXCPP to a clean gcc, g++ configuration?

share|improve this question

1 Answer 1

up vote 2 down vote accepted



Variables you set in the shell are only temporarily in that shell, so using another terminal window should also work.

Changes to environment variables are only made permanent when you edit an appropriate configuration file, like /etc/environment, /etc/profile, ~/.bash_profile, ~/.bashrc, etc.

share|improve this answer
Thanks! It was very useful! – Mutewinter Feb 1 '13 at 17:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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