gcc - Installing gfortran in Linux as a user -


i non-administrator user of linux (centos 6.6) server @ work. log in through terminal program on windows computer. problem not feel comfortable upgrading gcc/gfortran me want run personal folders. claim latest yum (devtoolset-3 os version) downgrade other feature have. it's not latest version of gcc anyway.

i have downloaded latest gcc 5.3 binaries , prerequisites gfortran.com , can test code compile. actually, when following compile -c not not link. folder put prerequisites , copied stuff /usr/lib64 directory there well.

ld_library_path=/users/home/me/me/gcc53mark/my_lib export ld_library_path ./gfortran test.f90  

the error message follows: collect2: fatal error: cannot find 'ld'

but ld exist

-bash-4.1$ whereis ld ld: /usr/bin/ld /usr/share/man/man1/ld.1.gz 

after effort have answered own question! install gcc own personal linux account non-administrator, ended having compile gcc , not use binaries downloaded. friend make install knows needs go, did not have binaries.

the key install user root directory /gcc following command provided build-it-yourself method (-prefix):

../gcc-5.3.0/configure --prefix$home/gcc-5.3.0 --enable-languages=c,c++,fortran --disable-multilib 

for me had disable multilib because guess system has 64 bit libraries (i think causing original problem).

before got point, had download prerequisites manually since workplace suppose blocks automatic prerequisite downloader referenced in these instructions.

https://gcc.gnu.org/wiki/installinggcc 

prerequisites need taken here, placed root of directory gets created when unzip gcc. unzip them , link them done in batch file have unzipped ./contrib/download_prerequisites.

ftp://gcc.gnu.org/pub/gcc/infrastructure/ 

finally need run following command, after looks @ new libraries. add .profile when ready switch local newer version.

ld_library_path=/users/home/myself/gcc-5.3.0/lib64 export ld_library_path 

for running gfortran following command add .profile later.

/users/home/myself/gcc-5.3.0/bin/gfortran test.f90 

it works! latest version of gcc running local linux user non-administrator account!

edited add how resolved network group: did not want overwrite original installation installed network folder /gcc-5.3.0 . modified group's .profile add library , binary paths that, before standard path.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -