ERROR: ld.so: object 'getpid.so' from LD_PRELOAD cannot be preloaded: ignored ERROR: ld.so: object 'getpid.so' from LD_PRELOAD cannot be preloaded: ignored linux linux

ERROR: ld.so: object 'getpid.so' from LD_PRELOAD cannot be preloaded: ignored


Looks like the loader is unable to find getpid.so as you've not mentioned the path to the library.

Try:

LD_PRELOAD=/full/path/to/getpid.so ./testpid


I was also facing error as below

ERROR: ld.so: object '/usr/lib64/libjemalloc.so.1' from LD_PRELOAD cannot be preloaded

Below were my steps resolved the error for me.

Go to the path /usr/lib64 and look for the libjemalloc using below commands*

  #cd /usr/lib64  #ls | grep libjemalloc

if you don't find you don't have that package installed in your system

  $sudo yum whatprovides libjemalloc*  $sudo yum install jemalloc-3.6.0-1.amzn2.x86_64