Error: image not found

Moderator: Moderator

Error: image not found

Postby InnaWiess » Mon Nov 28, 2022 4:39 am

Hey Guys, I can really use some help here. I have been trying to switch for ForexConnect for a few days, but still can't install it. All requirements seems to be satisfied, the forexconnect library is being installed without error or notification. But it still doesn't work. Any method (Jupyter, Pycharm, terminal...) import the library stumbles upon the same error:

"ImportError: dlopen(/opt/anaconda3/envs/ForexConnect/lib/python3.7/site-packages/forexconnect/lib/fxcorepy.so, 2): Library not loaded: /Library/Frameworks/Python.framework/Versions/3.7/Python
Referenced from: /opt/anaconda3/envs/ForexConnect/lib/python3.7/site-packages/forexconnect/lib/fxcorepy.so
Reason: image not found""

At the same time I can clearly see this fxcorepy.so file in the mentioned library, but it looks like the link is broken. Any suggestions? I'm pretty desperate at this point.

Inna
InnaWiess
 
Posts: 1
Joined: Mon Nov 28, 2022 4:23 am

Re: Error: image not found

Postby Konstantin.Usanov » Fri Dec 09, 2022 6:20 am

Hi, Inna, could u please provide versions of ForexConnect and OS whats u use.

According to ImportError missed some of depends for fxcorepy.so library:
"
...
Library not loaded: /Library/Frameworks/Python.framework/Versions/3.7/Python
Referenced from: /opt/anaconda3/envs/ForexConnect/lib/python3.7/site-packages/forexconnect/lib/fxcorepy.so
"
And it points to Python. Did u correct install its? Possible issue with path to Python.

Alternative check (system check of depends for fxcorepy.so), by ldd command:
"
$ ldd ./fxcorepy.so
linux-vdso.so.1 (0x00007ffdbebe8000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f08c3139000)
libForexConnect.so => ./libForexConnect.so (0x00007f08c1c00000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f08c3134000)
libpython3.7m.so => ./libpython3.7m.so (0x00007f08c1600000)
libboost_python3.so.1.64.0 => ./libboost_python3.so.1.64.0 (0x00007f08c1200000)
libboost_system.so.1.64.0 => ./libboost_system.so.1.64.0 (0x00007f08c0e00000)
libpricehistorymgr.so.2.8.0 => ./libpricehistorymgr.so.2.8.0 (0x00007f08c0a00000)
libquotesmgr2.so.2.8 => ./libquotesmgr2.so.2.8 (0x00007f08c0600000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f08c03d6000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f08c304b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f08c302b000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f08c01ae000)
libgsexpat.so => ./libgsexpat.so (0x00007f08bfe00000)
libfxtp.so => ./libfxtp.so (0x00007f08bfa00000)
libfxmsg.so => ./libfxmsg.so (0x00007f08bf400000)
libgstool3.so => ./libgstool3.so (0x00007f08bf000000)
liblog4cplus.so => ./liblog4cplus.so (0x00007f08bec00000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f08c3022000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f08c301b000)
libsqlite3.8.so => ./libsqlite3.8.so (0x00007f08be800000)
libhttplib.so => ./libhttplib.so (0x00007f08be200000)
/lib64/ld-linux-x86-64.so.2 (0x00007f08c314f000)
"
Please check for self, u do not have like "=> not found", and if u have it, so its components are missed.
Best regards,
Konstantin.
Konstantin.Usanov
FXCodeBase: Confirmed User
 
Posts: 47
Joined: Mon Aug 30, 2010 3:02 am
Location: Siberia, Omsk

Re: Error: image not found

Postby meb21uk » Wed May 10, 2023 2:22 pm

Hi Konstantin,

Hoping you can help please. I have also been referring to your "Problem installing the package" thread at https://fxcodebase.com/code/viewtopic.php?f=51&t=73024.

I am currently trying to install Forexconnect onto my Mac using VSCode and anaconda. When attempting to us the api, I get the following error:

ImportError: dlopen(/Users/....../forexconnect/lib/fxcorepy.so,
2): Library not loaded: /Library/Frameworks/Python.framework/Versions/3.7/Python
Referenced from: /Users/....../forexconnect/lib/fxcorepy.so
Reason: image not found

Reading your response to this thread, it may appear to be related to the dependents for the fxcorepy.so file.

The following is my specs:

OS: MacOS Big Sur Version: 11.7.4
Conda: 4.10.1
Python Version: 3.7.0
PIP Version: 22.3.1

To assess the dependencies I used otool function and it fed the following back:
./fxcorepy.so (compatibility version 0.0.0, current version 0.0.0)
@rpath/libForexConnect.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
/Library/Frameworks/Python.framework/Versions/3.7/Python (compatibility version 3.7.0, current version 3.7.0)
@rpath/libboost_python35.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)
@rpath/libpricehistorymgr.2.8.0.dylib (compatibility version 2.8.0, current version 0.0.0)
@rpath/libquotesmgr2.2.8.dylib (compatibility version 2.8.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 307.5.0)

There appears to be 4 incompatibilities, could any of these be causing my issue?

Thanks
meb21uk
 
Posts: 1
Joined: Wed May 10, 2023 2:07 pm


Return to ForexConnect API

Who is online

Users browsing this forum: No registered users and 5 guests