ld-preload

ERROR: ld.so: object 'libproxychains.so.3' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored


When I type the command proxychains chromium on linux terminal

it gives me this error:

ERROR: ld.so: object 'libproxychains.so.3' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored. Opening in existing browser session.

what should I do in order to get rid of this error and make sure that proxychains work properly?


Solution

  • I've faced the same problem, when trying to run something like :

    proxychains ping -c www.google.com  
    

    but when trying to run something else like to get my public ip addr :

    proxychains curl ifconfig.me 
    

    surprisingly it works flawlessly

    What i did to fix it was :

    1. First i searched for libproxychains.so.3 location :

      whereis libproxychains.so.3  
      

      Output :

      libproxychains.so: /usr/lib/x86_64-linux-gnu/libproxychains.so.3
      
    2. Next i took a look at the proxychains script /usr/bin/proxychains :

      sudo cat /usr/bin/proxychains
      

      Output :

       #!/bin/sh
       echo "ProxyChains-3.1 (http://proxychains.sf.net)"
       if [ $# = 0 ] ; then
           echo " usage:"
           echo "     proxychains <prog> [args]"
           exit
       fi
       export LD_PRELOAD=libproxychains.so.3
       exec "$@"
      
    3. Edited the script sudo nano /usr/bin/proxychains and changed the export to include the absolute path to libproxychains.so.3:

       export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libproxychains.so.3
      

      like this :

       #!/bin/sh
       echo "ProxyChains-3.1 (http://proxychains.sf.net)"
       if [ $# = 0 ] ; then
           echo " usage:"
           echo "     proxychains <prog> [args]"
           exit
       fi
       export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libproxychains.so.3
       exec "$@"
      

    Check again, the Error gone.

    You can also install proxychains4 that it is better in my opinion (you can use both if you wanted)

    to install proxychains4 : sudo apt install proxychains4