How can I install gcc6.4, g++6.4 and cmake3 on Ubuntu 14.04? I want to rewrite below lines that run on Linux to be run on Ubuntu
$ yum install gcc64-c++ libcurl-devel
$ export CC=gcc64
$ export CXX=g++64
$ yum install cmake3
I tried below commands on ubuntu
$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test
$ sudo apt update
$ sudo apt install -y g++-6
$ sudo apt install -y gcc-6
$ gcc --version
$ g++ --version
$ export CC=gcc6
$ export CXX=g++6
$ gcc --version
$ g++ --version
But version returned is
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
and
g++ (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4
Although I expect to be 6.4
And when I tried to install cmake3
$ sudo apt-get update
$ sudo apt purge cmake*
$ wget http://www.cmake.org/files/v3.5/cmake-3.5.1.tar.gz
$ tar xf cmake-3.5.1.tar.gz
$ cd cmake-3.5.1
$ ./configure
$ make
$ sudo make install
$ cmake --version
It gave me an error in ./configure
CMake 3.5.1, Copyright 2000-2016 Kitware, Inc.
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.