Skip to content
New issue

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

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

Already on GitHub? # to your account

error while loading shared libraries: libblas.so.3 in apt/user folder #64

Open
robomotic opened this issue Mar 25, 2020 · 5 comments
Open

Comments

@robomotic
Copy link

robomotic commented Mar 25, 2020

Hello there,
my buildpack sequence is:

my Aptfile looks like this:

  • flex
  • bison
  • libatlas3-base
  • libatlas-dev
  • libatlas3gf-base
  • libatlas-base-dev
  • nmap

When I try to use nmap I am getting this error:

nmap: error while loading shared libraries: libblas.so.3: cannot open shared object file: No such file or directory

I then ps:exec into the application and did find the files here:

./.apt/usr/lib/x86_64-linux-gnu/blas/libblas.so.3
./.apt/usr/lib/x86_64-linux-gnu/atlas/libblas.so.3

So there seems to be an issue with the LD_LIBRARY_PATH in the python package, but when I checked here:

https://github.com/robomotic/heroku-buildpack-python/blob/master/bin/compile

I can see the variables set up correctly:

export LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:$LIBRARY_PATH
export LD_LIBRARY_PATH=/app/.heroku/vendor/lib:/app/.heroku/python/lib:$LD_LIBRARY_PATH

~ $ echo $LIBRARY_PATH
/app/.heroku/vendor/lib:/app/.heroku/python/lib:/app/.apt/usr/lib/x86_64-linux-gnu:/app/.apt/usr/lib/i386-linux-gnu:/app/.apt/usr/lib:

~ $ echo $LD_LIBRARY_PATH
/app/.heroku/vendor/lib:/app/.heroku/python/lib:/app/.apt/usr/lib/x86_64-linux-gnu:/app/.apt/usr/lib/i386-linux-gnu:/app/.apt/usr/lib:

Any help debugging this is appreciated.

Cheers.

@robomotic
Copy link
Author

After some digging I also discovered that I can execute the same python code without any problem from the ps:exec shell but the same code from the web application generates the libblas.so.3 error.

I can't get my head around it .....

@haroldofurtado
Copy link

Having a similar problem trying to install and use gdal/gdalsrsinfo with Ruby/Ruby on Rails.

@khier996
Copy link

has anybody solved this issue? I am having a similar problem with seabolt library

@edmorley
Copy link
Member

Ah ok so this is because this buildpack has to use dpkg -x to "install" the .deb archives, which means this postinst script never gets run:

update-alternatives --install /usr/lib/x86_64-linux-gnu/libblas.so.3 \
                    libblas.so.3-x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 10

The way to fix this is to add the additional directory (.apt/usr/lib/x86_64-linux-gnu/blas) to LD_LIBRARY_PATH - for example by generating it dynamically as in #39.

@ThalusA
Copy link

ThalusA commented Apr 29, 2022

Would be awesome to have a fix without modifying LD_LIBRARY_PATH

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

No branches or pull requests

5 participants