Solved by XYC-EXP in post #5 
              
              
                Thanks.

At last I found out that I made a stupid mistake. 
The server had both CUDA 10 and CUDA 9 on it. 
And I forgot to switch to the correct version. 

ln -snf /usr/local/cuda-9.0/ /usr/local/cuda