Installaztion error from source

Hi, I’ve installed Pytorch several times, but no luck this time. I need to install the up-to-date codes, so I clone the source and installed every pre-condition software. But when I python install I just found such error. Any idea?

running install
running build_deps
cmake: /lib64/ version GLIBCXX_3.4.20' not found (required by cmake) cmake: /lib64/ versionCXXABI_1.3.9’ not found (required by cmake)
cmake: /lib64/ version `GLIBCXX_3.4.21’ not found (required by cmake)

OS: CentOS, I use gcc 4.8 then update to 4.9 + python 3.6.2 + Cuda 8.0 + cudnn 9.0. My GPU is 1080 Ti.
Thanks in advanced.

it’s an issue with your gcc/cmake install.

Are you using Anaconda python???

1 Like

Yes, I use conda. I finally find the problem, I use gcc version <5.0. when I update gcc to 5.2, the problem fixed.


Hi. I noticed that I have two gcc’s. One in Anaconda, the other for /usr/bin/gcc. So, which one did you update?


I update the gcc in Anaconda. Because the official installation instruction directly use:

conda install gcc

which only use gcc version 4.8 , so I have to replace with this command:

conda install -c salford_systems gcc-6

And everything goes well right now.

1 Like

For the record, if you (or somebody else) encounters other strange build errors (particularly stuff about at_exit, or pthread not found), then you might want to try this:

Instead of installing cmake and gcc via conda, install them via your system. I’m doing this on ubuntu 16.04.
So my setup looks like:

sudo apt-get install g++ cmake
conda install numpy pyyaml mkl setuptools cffi # notice g++ and cmake removed from here

This was mentioned, I think by Sean Naren on a warp-ctc build issue, but thought I might mention it here too.

1 Like

gcc-6 cannot compile source code correctly in my machine.
Linking C shared library
/usr/bin/ld: /home/xxx/anaconda3/lib/gcc/x86_64-pc-linux-gnu/6.1.0/crtbeginS.o: unrecognized relocation (0x2a) in section `.text’
/usr/bin/ld: final link failed: Bad value

I install gcc-5

conda install -c salford_systems gcc-5

Then It errors like this just as what @Ben_Harper says

/home/xxx/anaconda3/compiler_compat/ld: cannot find -lcuda
/home/xxx/anaconda3/compiler_compat/ld: cannot find -lpthread
/home/xxx/anaconda3/compiler_compat/ld: cannot find -lc

Thanks a lot, it works for me:blush: