Open ahmelsayed opened 4 years ago
Related: Azure/azure-functions-python-worker#560
Currently you can't set PATH
in Application settings at all.
I cannot find ld
in container image mcr.microsoft.com/azure-functions/python
as mlazowik pointed out in Azure/azure-functions-python-worker#560 .
$ docker run --rm -it mcr.microsoft.com/azure-functions/python sh -c "which ld"
$
Do you have a plan to add ld
to the container image?
Best Regards,
Even after adding the "fix" in https://github.com/Azure/azure-functions-docker/pull/170, I still can't see the runtime using LD_LIBRARY_PATH
to resolve libraries.
I'm using Python 3.9 on Linux Consumption Plan.
I have a couple of wheels, which are converted from conda packages, and they have their .so
dependencies unpacked to .python_packages/lib/site-packages/lib
where they don't seem to be picked up when importing.
I've set the LD_LIBRARY_PATH
to /home/site/wwwroot/.python_packages/lib/site-packages/lib
and receive a ImportError: libTKBRep.so.7: cannot open shared object file: No such file or directory.
I can confirm that using os.listdir('/home/site/wwwroot/.python_packages/lib/site-packages/lib')
actually returns the libTKBRep.so.7
in question. The exact same build on Ubuntu 20.04 locally actually uses the env variable and works if it's set (respectively doesn't work if it's NOT set).
What could be the issue? Does the runtime actually use the LD_LIBRARY_PATH
set in application settings?
I am also seeing this while trying to use OracleDB with Azure Function apps (v4 w/ Node 18).
To use the Oracle Node library, I have to configure:
LD_LIBRARY_PATH="/home/site/wwwroot/oracle-instant-client/"
However, after doing so with app settings:
and confirming that the env variable is loaded correctly and then checking the file system to see that the files are there, I'm still getting:
Error: DPI-1047: Cannot locate a 64-bit Oracle Client library: \"libclntsh.so: cannot open shared object file: No such file or directory\". See https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html for help",
"Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html",
"You must have Linux 64-bit Oracle Client libraries configured with ldconfig, or in LD_LIBRARY_PATH."
I can confirm that the libclntsh.so
is at the specified LD_LIBRARY_PATH
path. I can even confirm that the app works successfully when using func start
locally.
Even after adding the "fix" in Azure/azure-functions-docker#170, I still can't see the runtime using
LD_LIBRARY_PATH
to resolve libraries. I'm using Python 3.9 on Linux Consumption Plan. I have a couple of wheels, which are converted from conda packages, and they have their.so
dependencies unpacked to.python_packages/lib/site-packages/lib
where they don't seem to be picked up when importing. I've set theLD_LIBRARY_PATH
to/home/site/wwwroot/.python_packages/lib/site-packages/lib
and receive aImportError: libTKBRep.so.7: cannot open shared object file: No such file or directory.
I can confirm that usingos.listdir('/home/site/wwwroot/.python_packages/lib/site-packages/lib')
actually returns thelibTKBRep.so.7
in question. The exact same build on Ubuntu 20.04 locally actually uses the env variable and works if it's set (respectively doesn't work if it's NOT set).What could be the issue? Does the runtime actually use the
LD_LIBRARY_PATH
set in application settings?
After over 2 years since your initial comment (and nearly 5 years since this issue was opened) it's still not possible to append to PATH
and LD_LIBRARY_PATH
still appears to be completely ignored by the Azure function runtime. 😞
Context: #1358