Error: "libsecp256k1.so.0: cannot open shared object file" with pytonlib on Ubuntu
I'm running a Django project on Ubuntu, and I'm using the following requirements.txt
:
asgiref==3.8.1
bitarray==2.9.2
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.3.2
crc16==0.1.1
crc32c==2.7.post1
Django==5.1.1
djangorestframework==3.15.2
idna==3.8
mysqlclient==2.2.4
pycparser==2.22
PyNaCl==1.5.0
pytonlib
requests==2.32.3
sqlparse==0.5.1
tonsdk==1.0.15
tvm-valuetypes==0.0.12
tzdata==2024.1
urllib3==2.2.2
However, I’m facing the following error during runtime:
{'msg': 'libsecp256k1.so.0: cannot open shared object file: No such file or directory', 'method': 'deposit'}
Exception in tonlibjson.__del__: Traceback (most recent call last):
File "/path/to/venv/lib/python3.12/site-packages/pytonlib/tonlibjson.py", line 133, in __del__
self._tonlib_json_client_destroy(self._client)
AttributeError: 'TonLib' object has no attribute '_tonlib_json_client_destroy'
Exception ignored in: <function TonLib.__del__ at 0x72e2b810da80>
Traceback (most recent call last):
File "/path/to/venv/lib/python3.12/site-packages/pytonlib/tonlibjson.py", line 136, in __del__
raise RuntimeError(f'Error in tonlibjson.__del__: {ee}')
RuntimeError: Error in tonlibjson.__del__: 'TonLib' object has no attribute '_tonlib_json_client_destroy'
Steps I’ve already tried:
- Installed libsecp256k1 using sudo apt-get install libsecp256k1-dev.
- Verified the installation with ldconfig -p | grep libsecp256k1, and the library is listed. Despite these steps, the error persists. It seems related to the pytonlib and possibly an issue with the TonLib class.
Any help on resolving this error or further debugging steps would be greatly appreciated!