I am trying to run an executable file - SaTScanBatch, executable of the SaTScan software - on a remote machine from the terminal.
Here is the error I get
/usr/lib64/libstdc++.so.6: version 'GLIBCXX_3.4.15' not found
The problem is similar to these: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found or How to fix: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found or /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found
What is different in my case is that I do not have admin rights, so I cannot add libraries in usr/lib file. I downloaded libstdc++.6.0.15 in my remote repository, and I want to use it to execute my file.
Here are the possibilities I tried
i) Modify environment variable LD_LIBRARY_PATH or LD_RUN_PATH or LD_PRELOAD to the path of libstdc++.so.6.0.15. --> Did not change anything
ii) Include the library in a static way
gcc SaTScanBatch -static-libstdc++
--> -static option is not recognized, I guess the remote machine's GCC version is too old.
iii) Try to link the file to the additional library:
gcc SaTScanBatch -L /path/library -l stdc++
or similarly
gcc SaTScanBatch -Wl,-rpath,path/to/library
--> Error
/usr/bin/ld: warning: Cannot create .eh_frame_hdr section, --eh-frame-hdr ignored.
/usr/bin/ld: error in SaTScanBatch64(.eh_frame); no .eh_frame_hdr table will be created.
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../lib64/crt1.o: In function _start:
(.text+0x20): undefined reference to "main"
collect2: ld returned 1 exit status
iv) Use PatchElf to link the file and the library --> I cannot install PatchElf because no admin rights
Thank you for any suggestion !