Error creating new sites due to missing shared libraries on Linux

Bonjour,
Problème résolu suite à la mise à jour d’Ubuntu 16.04 --> 18.04

1 Like

Hi Ben,

I just tried using Local again on my lInux Mint install. I downloaded the latest version of Local and did all the Linux updates before trying. I got this error message:

Error: Command failed: /opt/Local/resources/extraResources/lightning-services/php-7.3.5+3/bin/linux/bin/php /opt/Local/resources/extraResources/bin/wp-cli/wp-cli.phar --path=/home/michael/Local Sites/blocktest/app/public --require=/opt/Local/resources/extraResources/bin/wp-cli/local-wpcli-error-reporting.php core config --skip-check --dbname=local --dbuser=root --dbpass=root --skip-salts
/opt/Local/resources/extraResources/lightning-services/php-7.3.5+3/bin/linux/bin/php-original: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

Same problem for me on Fedora 32:

1 Like

A post was split to a new topic: Error creating new sites with missing Local.php

don’t works for me with php 7.3.5…
image

I am on Fedora 32 and i fixed it simple.

Just find libnettle.so.6.5 in your system. In my case I find it in /var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/… Copy this file to /usr/lib64/ and rename it to libnettle.so.6.
The same you must do for libhogweed.so.4.

libnettle.so.6.5 -> /usr/lib64/libnettle.so.6
libhogweed.so.4.5 -> /usr/lib64/libhogweed.so.4

But I think these problems should not happen. Local developers, please fix it. Maybe distribute Local in Flatpak will prevent this issues.

1 Like

I manage to use Local on Ubuntu by fixing the librt error.

First, note that my answer is related to Ubuntu:
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal

Also, my local librt and the php version may vary depending on your needs, so change it accordingly.

  1. I first delete the existing libert in lightning services, it’s simply where it gets the error from:
    rm ~/.config/Local/lightning-services/php-7.4.1+10/bin/linux/shared-libs/librt.so.1

  2. Then I look at which librt is used and where is located: whereis librt
    I get “/usr/lib/x86_64-linux-gnu/librt.so”

  3. Then I relink librt with the wanted php version from Local:
    ln -s /usr/lib/x86_64-linux-gnu/librt.so ~/.config/Local/lightning-services/php-7.4.1+10/bin/linux/shared-libs/librt.so.1

  4. You can now delete the project that was not working and reinstall it, it will work!

2 Likes

I am on fedora 32 and Local requires libnettle 6 however the version of libnettle that is install is 7.0 can you please fix this. Maybe using a Flatpak would solve all the issues.

1 Like

hey did u get the solution. I have the same error

I am using ubuntu 16.04 and getting the same issue as @Flemin …what can I do to resolve it

Can you provide the exact error that you are seeing?

There’s usually a note about what shared library is missing which can help you in zeroing in on what’s missing.

I get this issue when I try to install start my first website

Thanks for providing that screenshot and the info of using Ubuntu 16.04!

It looks like you have a few options from within this topic:

  1. Upgrade to the most recent version of Ubuntu. This can be a pretty be step, so it may not be the right one for you, but wanted to point that out.

  2. Can you try the steps outlined in @MaximeCulea’s post: Error creating new sites due to missing shared libraries on Linux Make sure to update the commands to use the library name in your error message, so for example, replace librt.so.1 with libssl.so.1.1

If you do try option 2 – can you let us know how it goes for you and if it fixes things?

Fedora 32 users - I think I’ve found you a good scotch tape kind of fix. You need files(libhogweed.so.4 and libnettle.so.6) that only come from an older version of the package nettle. So rather than install the latest nettle with dnf, go grab and extract an older one(3.4.1) and use its lib files with these commands.

cd ~/Downloads
sudo dnf install wget
wget https://kojipkgs.fedoraproject.org//packages/nettle/3.4.1rc1/3.fc31/x86_64/nettle-3.4.1rc1-3.fc31.x86_64.rpm
rpm2cpio nettle-3.4.1rc1-3.fc31.x86_64.rpm | cpio -idmv
sudo cp usr/lib64/libhogweed.so.4 /usr/lib64/
sudo cp usr/lib64/libnettle.so.6 /usr/lib64/

And then install a new site in your Local app to test.

2 Likes

Tested, it’s a perfect solution in Fedora 32. Thanks a lot!

This worked for me - thanks very much for sharing. Ideally, we shouldn’t need to do this - but now I’ve got a solution, so this is great.

Again errors on Fedora 33… is the Linux version tested?

image

Does anyone have this successfully working on Ubuntu 18 or 20? If so, please reply here. I’d be willing to pay someone for some support. I love the idea of using Local but I’m really struggling with it working on Linux, and/or structuring the import file correctly.

Hey all,

This issue has been patched up and we have released an updated version of PHP 7.4.1 to Local Lightning Services. If you already have PHP 7.4.1 installed in Local, you will need to follow the following instructions to manually get the latest version:

Note: the post above does not contain the correct path to the Lightning Services dir on Linux. The correct path for Linux is ~/.config/Local/lightning-services.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.