Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: TomyTurbos on February 13, 2019, 11:06:01 PM

Title: php7-cli error
Post by: TomyTurbos on February 13, 2019, 11:06:01 PM
Command: 'php -v'

Error:
Quote
php: error while loading shared libraries: libpcre2-8.so.(): cannot open shared object file: No such file or directory

Any insight on this?
Title: php7-cli error
Post by: Rich on February 13, 2019, 11:14:25 PM
Hi TomyTurbos
I take it you're running TC10 and referring to  php7-cli.tcz. Try loading  pcre2.tcz  and see if that fixes it.
Title: Re: php7-cli error
Post by: TomyTurbos on February 14, 2019, 12:02:33 AM
That fixed it.  Again, muchos gracias!

(Installed as an on-boot)

php7-cli.tcz needs to be recompiled with this as a dependency.
Title: Re: php7-cli error
Post by: TomyTurbos on February 14, 2019, 12:07:28 AM
Please edit my post title to say 'php7-cli error'.
Title: Re: php7-cli error
Post by: Rich on February 14, 2019, 12:14:50 AM
Hi TomyTurbos
... php7-cli.tcz needs to be recompiled with this as a dependency.
Actually, it sounds like the dependency file needs to list  pcre2.tcz  instead of  pcre.tcz.

Please edit my post title to say 'php7-cli error'.
Done.
Title: Re: php7-cli error
Post by: andyj on February 14, 2019, 08:53:59 AM
PHP 7.3 moved to PCRE 2. 32-bit it should be pcre2.tcz. 64-bit it is pcre21032.tcz. The extension directory changes between PHP versions, so watch out for that too.
Title: Re: php7-cli error
Post by: TomyTurbos on February 14, 2019, 08:15:11 PM
I'm not sure yet but this may also be required for php-cgi and php-fpm to work properly under php7.
Title: Re: php7-cli error
Post by: andyj on February 14, 2019, 08:20:42 PM
Yes, pcre2 is required for all PHP 7.3 extensions on all platforms. I have some updates that I need to work on this weekend anyway.
Title: Re: php7-cli error
Post by: TomyTurbos on February 14, 2019, 09:01:02 PM
In that case, the .dep files need to be updated.  I would do it myself, but I don't know how.
Title: Re: php7-cli error
Post by: coreplayer2 on February 14, 2019, 10:39:53 PM
Command: 'php -v'

Error:
Quote
php: error while loading shared libraries: libpcre2-8.so.(): cannot open shared object file: No such file or directory

Any insight on this?
A heads up on this type of error..

Whenever you receive this message "error while loading shared libraries: libxxxxx.so cannot open shared object file" it means the application was already compiled against the missing module and said library can't be found.   Usually the application has been updated and the extension maintainer forgot to update it's dep file.

To temporarily resolve this error, open APPS > apps > cloud > browse > provides (under search drop-down menu)  > copy/paste "libpcre2-8.so" into the search bar and hit enter to find the extension which includes the missing library.  Temporarily add the missing extension to onboot.lst until the dep file has been updated or add the extension name to the applications dep file. Then load the missing extension or reboot.
Code: [Select]
tce-load -i pcre2.tcz
It's sufficient to post the error message and the extension name which resolved the error that prevented the application from loading.  pcre2.tcz as in this case.   It's the responsibility of the extension maintainer to correct the dep file and submit an update.  However admins are very kind and will usually update the dep file as needed.   A quick pm to advise the maintainer would be courteous.

regards
Title: Re: php7-cli error
Post by: Juanito on February 15, 2019, 03:04:16 AM
Actually, it sounds like the dependency file needs to list  pcre2.tcz  instead of  pcre.tcz.

dep file updated
Title: Re: php7-cli error
Post by: TomyTurbos on February 15, 2019, 08:11:30 PM
Actually, it sounds like the dependency file needs to list  pcre2.tcz  instead of  pcre.tcz.

dep file updated

I hope I'm not pestering, but I don't understand this, and I want to.

Using 'Apps', when I search for php7-(whatever) and go to the 'depends' tab, it still shows as pcre.tcz rather than pcre2.tcz.

This is not a problem for me using these as I already edited the files locally before you updated them, and they now work as expected.  I'm just wondering why the change does not show on the server. (Mirror is ibiblio, so I would not think there's an issue of latency involved).
Title: Re: php7-cli error
Post by: Rich on February 15, 2019, 08:17:01 PM
Hi TomyTurbos
It may take a while to propagate to  ibiblio.  Most repos sync once a day. It's correct in the main repo:
http://tinycorelinux.net/10.x/x86/tcz/php7-cli.tcz.dep
Title: Re: php7-cli error
Post by: TomyTurbos on February 16, 2019, 03:51:33 PM
Hi TomyTurbos
It may take a while to propagate to  ibiblio.  Most repos sync once a day. It's correct in the main repo:
http://tinycorelinux.net/10.x/x86/tcz/php7-cli.tcz.dep

Oh.  I get it now. 

However, it should be noted that php7-cgi and php7-fmp also depend on pcre2.  At this moment, only php-cli shows as such.
Title: Re: php7-cli error
Post by: Rich on February 16, 2019, 03:58:12 PM
Hi TomyTurbos
... However, it should be noted that php7-cgi and php7-fmp also depend on pcre2.  At this moment, only php-cli shows as such.
Base on reply #7 of this thread it looks like andyj is working on updates.