WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: php7-cli error  (Read 522 times)

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
php7-cli error
« on: February 13, 2019, 08: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?
« Last Edit: February 13, 2019, 09:10:00 PM by Rich »

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6348
php7-cli error
« Reply #1 on: February 13, 2019, 08: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.
« Last Edit: February 13, 2019, 09:10:10 PM by Rich »

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: php7-cli error
« Reply #2 on: February 13, 2019, 09:02:33 PM »
That fixed it.  Again, muchos gracias!

(Installed as an on-boot)

php7-cli.tcz needs to be recompiled with this as a dependency.
« Last Edit: February 13, 2019, 09:10:23 PM by Rich »

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: php7-cli error
« Reply #3 on: February 13, 2019, 09:07:28 PM »
Please edit my post title to say 'php7-cli error'.
« Last Edit: February 13, 2019, 09:10:38 PM by Rich »

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6348
Re: php7-cli error
« Reply #4 on: February 13, 2019, 09:14:50 PM »
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.

Offline andyj

  • Hero Member
  • *****
  • Posts: 683
Re: php7-cli error
« Reply #5 on: February 14, 2019, 05: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.

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: php7-cli error
« Reply #6 on: February 14, 2019, 05: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.

Offline andyj

  • Hero Member
  • *****
  • Posts: 683
Re: php7-cli error
« Reply #7 on: February 14, 2019, 05: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.

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: php7-cli error
« Reply #8 on: February 14, 2019, 06:01:02 PM »
In that case, the .dep files need to be updated.  I would do it myself, but I don't know how.

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 2847
Re: php7-cli error
« Reply #9 on: February 14, 2019, 07: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
« Last Edit: February 14, 2019, 07:47:27 PM by coreplayer2 »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 10537
Re: php7-cli error
« Reply #10 on: February 15, 2019, 12:04:16 AM »
Actually, it sounds like the dependency file needs to list  pcre2.tcz  instead of  pcre.tcz.

dep file updated

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: php7-cli error
« Reply #11 on: February 15, 2019, 05: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).

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6348
Re: php7-cli error
« Reply #12 on: February 15, 2019, 05: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

Offline TomyTurbos

  • Jr. Member
  • **
  • Posts: 95
Re: php7-cli error
« Reply #13 on: February 16, 2019, 12: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.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6348
Re: php7-cli error
« Reply #14 on: February 16, 2019, 12: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.