Error installing Mrtrix on centos

Hello!
On running the ./configure command on centos I am getting this:-

Checking for Eigen3 library: 
ERROR: error compiling Eigen3 application!

    MRtrix3 was unable to compile a test program involving Eigen3.

  Set the EIGEN_CFLAGS environment variable to inform 'configure' of
  the flags it must provide to the compiler in order to compile
  programs that use Eigen3 functionality; this may include the path to
  the Eigen3 include files, as well as any required flags.
  For example:
    $ export EIGEN_CFLAGS="-isystem /usr/include/eigen3"
    $./configure
  (amend with the actual path to the Eigen3 include files on your system)

Configure.log file for the reference is -

REPORT: 
MRtrix build type requested: release version
PATH set to: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REPORT: Detecting OS: linux

REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
error invoking command "clang++": No such file or directory
>>


REPORT: not found

REPORT: Looking for compiler [g++]:
EXEC <<
CMD: g++ --version
EXIT: 0
STDOUT:
g++ (GCC) 5.1.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>


REPORT: g++ (GCC) 5.1.0

REPORT: Checking for C++11 compliance:

COMPILE /tmp/tmpsmSoKs.cpp:
---

#include <cstddef>
struct Base {
    Base (int);
};
struct Derived : Base {
    using Base::Base;
};

int main() {
  Derived D (int); // check for contructor inheritance
  return 0;
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmpsmSoKs.cpp -o /tmp/tmpsmSoKs.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpsmSoKs.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
>>


REPORT: ok

REPORT: Checking shared library generation:
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmpQrwhsC.cpp -o /tmp/tmpQrwhsC.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpQrwhsC.o -shared -Wl,--sort-common,--as-needed -pthread -o libtest.so
EXIT: 0
>>


REPORT: ok

REPORT: Detecting pointer size:

COMPILE /tmp/tmp568zFH.cpp:
---

#include <iostream>
int main() {
  std::cout << sizeof(void*);
  return (0);
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmp568zFH.cpp -o /tmp/tmp568zFH.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmp568zFH.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
8
>>


REPORT: 64 bit

REPORT: Detecting byte order:

REPORT: little-endian

REPORT: Checking for variable-length array support:

COMPILE /tmp/tmpxOV_oY.cpp:
---

int main(int argc, char* argv[]) {
  int x[argc];
  return 0;
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpxOV_oY.cpp -o /tmp/tmpxOV_oY.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpxOV_oY.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
>>


REPORT: ok

REPORT: Checking for non-POD variable-length array support:

COMPILE /tmp/tmpVd9vD9.cpp:
---

#include <string>

class X {
  int x;
  double y;
  std::string s;
};

int main(int argc, char* argv[]) {
  X x[argc];
  return 0;
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpVd9vD9.cpp -o /tmp/tmpVd9vD9.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpVd9vD9.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 1
STDERR:
./a.out: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./a.out)
>>


REPORT: not found

REPORT: Checking for ::max_align_t:

COMPILE /tmp/tmpfYqCDY.cpp:
---

#include <iostream>
#include <cstddef>
using ::max_align_t;
int main() {
  std::cout << alignof (max_align_t) << " bytes\n";
  return 0;
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /tmp/tmpfYqCDY.cpp -o /tmp/tmpfYqCDY.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpfYqCDY.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
16 bytes
>>


REPORT: 16 bytes

REPORT: Checking for std::max_align_t:

COMPILE /tmp/tmpc3JABk.cpp:
---

#include <iostream>
#include <cstddef>
using std::max_align_t;
int main() {
  std::cout << alignof (max_align_t) << " bytes\n";
  return 0;
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /tmp/tmpc3JABk.cpp -o /tmp/tmpc3JABk.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpc3JABk.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
16 bytes
>>


REPORT: 16 bytes
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 1
STDERR:
Package eigen3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `eigen3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'eigen3' found
>>

error running "pkg-config --cflags eigen3"


REPORT: Checking for Eigen3 library:

COMPILE /tmp/tmp8ibLlI.cpp:
---

#include <cstddef>
#include <Eigen/Core>
#include <iostream>

int main (int argc, char* argv[]) {
  std::cout << EIGEN_WORLD_VERSION << "." << EIGEN_MAJOR_VERSION << "." << EIGEN_MINOR_VERSION << "\n";
  return 0;
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -isystem /usr/include/eigen3 /tmp/tmp8ibLlI.cpp -o /tmp/tmp8ibLlI.o
EXIT: 1
STDERR:
/tmp/tmp8ibLlI.cpp:3:22: fatal error: Eigen/Core: No such file or directory
compilation terminated.
>>

error deleting temporary file "/tmp/tmp8ibLlI.o": No such file or directory
ERROR: error compiling Eigen3 application!

    MRtrix3 was unable to compile a test program involving Eigen3.

  Set the EIGEN_CFLAGS environment variable to inform 'configure' of
  the flags it must provide to the compiler in order to compile
  programs that use Eigen3 functionality; this may include the path to
  the Eigen3 include files, as well as any required flags.
  For example:
    $ export EIGEN_CFLAGS="-isystem /usr/include/eigen3"
    $./configure
  (amend with the actual path to the Eigen3 include files on your system)

I am having the gcc version 5.1.0. Any Help?

Thanks
Punit

You’re missing the eigen3 dependency – or at least, the configure script can’t find it. I think on CentOS, all you’d need to do is install the eigen3-devel package, using whatever package manager CentOS uses (yum or rpm maybe?).