Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure functions: error while loading shared libraries: libssl3.so #24

Open
aorsten opened this issue Nov 25, 2019 · 7 comments
Open

Azure functions: error while loading shared libraries: libssl3.so #24

aorsten opened this issue Nov 25, 2019 · 7 comments

Comments

@aorsten
Copy link

aorsten commented Nov 25, 2019

I'm trying to set this up in Azure functions, a python function which runs on Linux. I've managed to do some of the steps, but am now stuck on the conversion command.

Actually, what I need is to convert EMF and WMF files to PNG - not the entire PDF converter. But I'm trying to set up the PDF converter from a simple .TXT file first.

I've so far managed to:

  1. Connect to Azure Storage (S3 bucket equivalent) and pull the "test.txt" file into a "/tmp" folder.
  2. (I push the lo.tar.gz file along with the code - so no need to pull it from Storage/Bucket) Run the "tar -xf lo.tar.gz" and confirm that I get the executable at "/instdir/program/soffice.bin"
  3. Execute "instdir/program/soffice ~~" using subprocess (rather than os.system, so that I get the output and error messages) However, I get an error here:
        STDOUT: '',
        STDERR: '/tmp/functions\\\\standby\\\\wwwroot/instdir/program/soffice.bin: error while loading shared libraries: libssl3.so: cannot open shared object file: No such file or directory\\n',

I'm really inexperienced with Linux - so I don't understand the error message I'm getting here. Does it mean there's some system files that are required, which aren't included in the lo.tar.gz file?

I have used the lo.tar.gz file you had precompiled for Lambda. Do you reckon it should work here as well - or would I need to build my own specific file for use on Azure Functions (Python functions run on Linux)?

Any help here is much appreciated. And of course I'll share the code for Azure Functions once I manage to get it working - if that's interesting.

@aorsten
Copy link
Author

aorsten commented Nov 25, 2019

For info, EMF/WMF to PNG conversion can be done with libreoffice with such a command:
soffice --headless --convert-to png my_file.emf

@aorsten
Copy link
Author

aorsten commented Nov 25, 2019

About the Linux version, I tried running lsb_release -a in the Function, resulting in:

Distributor ID: Debian
Description: Debian GNU/Linux 9.11 (stretch)
Release: 9.11
Codename: stretch

uname -a: Linux ccvm1 4.19.75-microsoft-standard #1 SMP Sat Sep 28 17:47:25 UTC 2019 x86_64 GNU/Linux

@aorsten
Copy link
Author

aorsten commented Nov 27, 2019

About this, I have compiled a new lo.tar.gz for use in Azure Functions for Python on Debian 9 (stretch). So far it seems to work - I'll have to do some checks.

If interesting, I can probably share the release. I'm a complete beginner on the topic of building Linux tar balls, and did this on a Debian Virtual Machine in Azure: If I share the tar-ball, will I somehow expose any secrets or security holes regarding my own Azure? (I cant really think of anything, but I'm not really qualified to answer this)

@randombluff
Copy link
Contributor

@aorsten Hello, nope, that's ok if in the tarball there is only a compiled LibreOffice. It can really expose the system runtime type only ;)
Just check the tarball content to maximum match those folders like help, preset, program, sdk and share, core and other that can be found in the builded lo folder structure. All subfolders included and dotfiles like .DB_Store and .wh..wh..opq and possible other options ;)

@ZsoltPath
Copy link

I've run into the same issue in AWS Lambda.
Built a layer and attached it to the Lambda code.
Now getting the /tmp/lo/instdir/program/soffice.bin: error while loading shared libraries: libssl3.so: cannot open shared object file: No such file or directory error

@MichaelPeter
Copy link

@aorsten Hi, I am also interested in an Azure Function version, did you succeed? Is there maybe a repo?

@plyhdrn
Copy link

plyhdrn commented Dec 12, 2022

Hi @aorsten, I ran into the same problem when trying to make it work in Azure Functions. If you can share how you solved this problem I would appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants