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

PHP Startup: Unable to load dynamic library 'newrelic.so' #1349

Closed
lexsoft00 opened this issue Feb 22, 2019 · 9 comments
Closed

PHP Startup: Unable to load dynamic library 'newrelic.so' #1349

lexsoft00 opened this issue Feb 22, 2019 · 9 comments

Comments

@lexsoft00
Copy link

lexsoft00 commented Feb 22, 2019

Upgrade to HEAD

My system VPS 2core 8GB RAM
Runs BOA PHP7.0

The first head update goes well but it seems it did not installed newrelic.so.
For some reason, it's installed most of PHP version (5.6 7.0 7.2 7.3) even if I only specified 7.2 for CLI and fpm and multi PHP only 7.2 and 7.3

Second update was to upgrade Jessie to Stretch
Got this on all PHP versions:
/opt/php56/bin/php: /usr/lib/libpng12.so.0: version PNG12_0' not found (required by /opt/php56/bin/php)`
But everything installed fine except:

PHP Warning: PHP Startup: Unable to load dynamic library 'newrelic.so' (tried: /opt/php72/lib/php/extensions/no-debug-non-zts-20170718/newrelic.so (/opt/php72/lib/php/extensions/no-debug-non-zts-20170718/newrelic.so: cannot open shared object file: No such file or directory), /opt/php72/lib/php/extensions/no-debug-non-zts-20170718/newrelic.so.so (/opt/php72/lib/php/extensions/no-debug-non-zts-20170718/newrelic.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Running HEAD update again to see if that solve the issue:
It seems every time I do an update I get:
/opt/php56/bin/php: /usr/lib/libpng12.so.0: version PNG12_0' not found (required by /opt/php56/bin/php)`

That did not solve this issue.
Is there a command to force reinstall newrelics?

@lexsoft00
Copy link
Author

I've run newrelic-install install and solved the issue

New Relic PHP Agent Installation (interactive mode)
===================================================

Found a valid PHP in : /usr/bin
         PHP Version : 7.2.15
  Module API version : 20170718
    Module directory : /opt/php72/lib/php/extensions/no-debug-non-zts-20170718
  Zend Thread Safety : no
        CLI ini file : /opt/php72/lib/php.ini
      Install Status : OK


Agent installation complete. The following php.ini files need to be
modified by hand to load the New Relic extension, enable
it, and configure it. A sample ini file fragment can be found at:

    /usr/lib/newrelic-php5/scripts/newrelic.ini.template

Without performing this step the agent will not be loaded correctly. The
ini file(s) you need to modify are:

    /opt/php72/lib/php.ini


New Relic is now installed on your system. Congratulations!


1. Set newrelic.appname in your newrelic.ini file.

2. Restart your web server. This will fix most reporting issues and
   load the agent's new features and bug fixes.

If you have questions or comments, go to http://support.newrelic.com.

@omega8cc
Copy link
Owner

Please note that Jessie to Stretch upgrade is a work in progress, not officially supported yet. Thanks for the feedback!

@lexsoft00
Copy link
Author

lexsoft00 commented Feb 25, 2019

Everything is working fine, I believe the migration was successful. All the website are running fine with PHP 7.2. The upgrade output:

OA [16:27:29] ==> Skynet Agent v.BOA-4.0.0-prod welcomes you aboard!

BOA [16:27:32] ==> INFO: UPGRADE

BOA [16:27:48] ==> VIRT: This system is supported: Linux KVM guest

BOA [16:27:48] ==> Aegir on Debian/jessie x86_64 PHP 7.2

BOA [16:28:01] ==> WARN: Jessie to Stretch upgrade will start in 60 seconds...
BOA [16:28:01] ==> WARN: Now pray it will work... or hit ctrl-c to stop now!
BOA [16:29:02] ==> WARN: Too late! Jessie to Stretch upgrade in progress...
BOA [16:29:02] ==> HINT: Run tail -f /var/backups/barracuda-upgrade-190222-1627.log
BOA [16:29:02] ==> HINT: in another terminal window to watch details
BOA [16:44:06] ==> INFO: Upgrading Nginx...
BOA [16:47:32] ==> INFO: Removing systemd on Debian jessie...

BOA [16:48:08] ==> INFO: No errors? Then Jessie to Stretch upgrade was successful :)
BOA [16:48:08] ==> INFO: REBOOT your system once Barracuda will complete all upgrades!

BOA [16:48:08] ==> INFO: Installing extra Drush versions...
BOA [16:48:15] ==> INFO: Running system packages update...
BOA [16:49:09] ==> INFO: Upgrading required libraries and tools...
BOA [16:49:39] ==> INFO: Installed OpenSSH version 7.4p1, upgrade required
BOA [16:49:39] ==> INFO: Building OpenSSH 7.9p1 from sources, please wait...
BOA [16:51:07] ==> INFO: Running aptitude full-upgrade...
BOA [16:51:58] ==> INFO: Building Git 2.20.1 from sources, please wait...
BOA [16:54:45] ==> INFO: Upgrading Nginx...
BOA [16:57:50] ==> INFO: Installing wkhtmltopdf and wkhtmltoimage x86_64...
BOA [16:57:55] ==> INFO: Installing VnStat monitor...
BOA [16:58:23] ==> INFO: PHP to 5.6.40 rebuild forced
/opt/php56/bin/php: /usr/lib/libpng12.so.0: version `PNG12_0' not found (required by /opt/php56/bin/php)
BOA [16:58:23] ==> INFO: Installed PHP version 5.x, upgrade required
BOA [16:58:23] ==> INFO: Building PHP 5.6.40 from sources, please wait...
BOA [16:58:31] ==> INFO: Building PHP 5.6.40 part 1/3
BOA [16:58:32] ==> INFO: Building PHP 5.6.40 part 2/3
BOA [16:58:49] ==> INFO: Building PHP 5.6.40 part 3/3
BOA [16:58:49] ==> INFO: Building PHP 5.6.40 part 2/3 (again)
sed: can't read /var/opt/php-5.6.40/Makefile: No such file or directory
BOA [16:59:09] ==> INFO: Building PHP 5.6.40 part 3/3 (again)
BOA [16:59:09] ==> INFO: Installing PhpRedis for PHP 5.6.40...
BOA [16:59:32] ==> INFO: Installing UploadProgress for PHP 5.6.40...
BOA [16:59:40] ==> INFO: Installing JSMin for PHP 5.6.40...
BOA [16:59:49] ==> INFO: Installing Twig C for PHP 5.6.40...
BOA [16:59:58] ==> INFO: Installing Imagick for PHP 5.6.40...
BOA [17:00:15] ==> INFO: Installing MailParse for PHP 5.6.40...
BOA [17:00:25] ==> INFO: Installing YAML for PHP 5.6.40...
BOA [17:00:37] ==> INFO: PHP to 7.0.33 rebuild forced
/opt/php70/bin/php: /usr/lib/libpng12.so.0: version `PNG12_0' not found (required by /opt/php70/bin/php)
BOA [17:00:37] ==> INFO: Installed PHP version 5.x, upgrade required
BOA [17:00:37] ==> INFO: Building PHP 7.0.33 from sources, please wait...
BOA [17:00:43] ==> INFO: Building PHP 7.0.33 part 1/3
BOA [17:00:48] ==> INFO: Building PHP 7.0.33 part 2/3
BOA [17:01:47] ==> INFO: Building PHP 7.0.33 part 3/3
BOA [17:15:15] ==> INFO: Installing PhpRedis for PHP 7.0.33...
BOA [17:15:38] ==> INFO: Installing UploadProgress for PHP 7.0.33...
BOA [17:15:48] ==> INFO: Installing JSMin for PHP 7.0.33...
BOA [17:15:57] ==> INFO: Installing Imagick for PHP 7.0.33...
BOA [17:16:13] ==> INFO: Installing YAML for PHP 7.0.33...
BOA [17:16:27] ==> INFO: PHP to 7.2.15 rebuild forced
/opt/php72/bin/php: /usr/lib/libpng12.so.0: version `PNG12_0' not found (required by /opt/php72/bin/php)
BOA [17:16:27] ==> INFO: Installed PHP version 5.x, upgrade required
BOA [17:16:27] ==> INFO: Building PHP 7.2.15 from sources, please wait...
BOA [17:16:34] ==> INFO: Building PHP 7.2.15 part 1/3
BOA [17:16:38] ==> INFO: Building PHP 7.2.15 part 2/3
BOA [17:17:39] ==> INFO: Building PHP 7.2.15 part 3/3
BOA [17:32:48] ==> INFO: Installing PhpRedis for PHP 7.2.15...
BOA [17:33:09] ==> INFO: Installing UploadProgress for PHP 7.2.15...
BOA [17:33:19] ==> INFO: Installing JSMin for PHP 7.2.15...
BOA [17:33:28] ==> INFO: Installing Imagick for PHP 7.2.15...
BOA [17:33:44] ==> INFO: Installing YAML for PHP 7.2.15...
BOA [17:33:58] ==> INFO: PHP to 7.3.2 rebuild forced
/opt/php73/bin/php: error while loading shared libraries: libzip.so.2: cannot open shared object file: No such file or directory
BOA [17:33:58] ==> INFO: Installed PHP version 5.x, upgrade required
BOA [17:33:58] ==> INFO: Building PHP 7.3.2 from sources, please wait...
BOA [17:34:05] ==> INFO: Building PHP 7.3.2 part 1/3
BOA [17:34:09] ==> INFO: Building PHP 7.3.2 part 2/3
BOA [17:35:13] ==> INFO: Building PHP 7.3.2 part 3/3
BOA [17:49:53] ==> INFO: Installing PhpRedis for PHP 7.3.2...
BOA [17:50:16] ==> INFO: Installing UploadProgress for PHP 7.3.2...
BOA [17:50:25] ==> INFO: Installing JSMin for PHP 7.3.2...
BOA [17:50:34] ==> INFO: Installing Imagick for PHP 7.3.2...
BOA [17:50:51] ==> INFO: Installing YAML for PHP 7.3.2...
/opt/php56/bin/php: /usr/lib/libpng12.so.0: version `PNG12_0' not found (required by /opt/php56/bin/php)
BOA [17:51:05] ==> INFO: Upgrading Limited Shell to version 0.9.18.9...
BOA [17:51:17] ==> INFO: Installing Redis update for Debian/jessie...

BOA [17:52:33] ==> INFO: Aegir Master Instance upgrade skipped!

BOA [17:52:33] ==> NOTE! You must reboot the server and run barracuda upgrade
BOA [17:52:33] ==> NOTE! again to complete all system upgrades and upgrade also
BOA [17:52:33] ==> NOTE! Aegir Master Instance.

BOA [17:52:34] ==> INFO: Building Pure-FTPd server from sources, please wait...
BOA [17:53:19] ==> INFO: Running MySQLTuner check on all databases...
BOA [17:53:19] ==> NOTE! This step may take a LONG time, please wait...
BOA [17:53:27] ==> INFO: Restarting Jetty 9
BOA [17:53:32] ==> INFO: Restarting Redis, PHP-FPM and Nginx...
BOA [17:53:48] ==> INFO: Running MariaDB system tables upgrade, please wait...
BOA [17:53:50] ==> INFO: MariaDB diff0 empty
BOA [17:53:50] ==> INFO: MariaDB Uptime: 1 hour 2 min 11 sec
BOA [17:53:55] ==> INFO: Cleaning up system swap, it may take a moment...
BOA [17:54:00] ==> INFO: Upgrading csf/lfd firewall...
BOA [17:54:03] ==> TEST: csf/lfd firewall should work fine on this system
BOA [17:54:04] ==> INFO: csf/lfd firewall upgrade completed
BOA [17:54:05] ==> INFO: DNS cache pdnsd server re-installation forced
BOA [17:54:05] ==> INFO: Installing DNS cache pdnsd server...
BOA [17:55:05] ==> CARD: Now charging your credit card for this magic show...
BOA [17:55:08] ==> CARD: It will take a moment to process your payment...
BOA [17:55:14] ==> JOKE: Just kidding !!! Enjoy your Aegir Hosting System :)

BOA [17:55:18] ==> Final post-upgrade cleaning, one moment...
BOA [17:55:39] ==> BYE!

@omega8cc
Copy link
Owner

This should be displayed more prominently perhaps, but after running major system upgrade and rebooting you should run barracuda upgrade again to complete the upgrade.

@lexsoft00
Copy link
Author

Still installs PHP 5.6 for some reason.

BOA [22:38:21] ==> INFO: Installing extra Drush versions...
BOA [22:38:27] ==> INFO: Running system packages update...
BOA [22:39:20] ==> INFO: Upgrading required libraries and tools...
BOA [22:40:05] ==> INFO: Running aptitude full-upgrade...
/opt/php56/bin/php: /usr/lib/libpng12.so.0: version `PNG12_0' not found (required by /opt/php56/bin/php)
/opt/php56/bin/php: /usr/lib/libpng12.so.0: version `PNG12_0' not found (required by /opt/php56/bin/php)
/opt/php56/bin/php: /usr/lib/libpng12.so.0: version `PNG12_0' not found (required by /opt/php56/bin/php)
BOA [22:40:45] ==> INFO: Installed PHP version , upgrade required
BOA [22:40:45] ==> INFO: Building PHP 5.6.40 from sources, please wait...
BOA [22:40:52] ==> INFO: Building PHP 5.6.40 part 1/3
BOA [22:40:53] ==> INFO: Building PHP 5.6.40 part 2/3
BOA [22:41:13] ==> INFO: Building PHP 5.6.40 part 3/3
BOA [22:41:13] ==> INFO: Building PHP 5.6.40 part 2/3 (again)
sed: can't read /var/opt/php-5.6.40/Makefile: No such file or directory
BOA [22:41:35] ==> INFO: Building PHP 5.6.40 part 3/3 (again)
BOA [22:41:35] ==> INFO: Installing PhpRedis for PHP 5.6.40...
BOA [22:41:57] ==> INFO: Installing UploadProgress for PHP 5.6.40...
BOA [22:42:05] ==> INFO: Installing JSMin for PHP 5.6.40...
BOA [22:42:15] ==> INFO: Installing Twig C for PHP 5.6.40...
BOA [22:42:23] ==> INFO: Installing Imagick for PHP 5.6.40...
BOA [22:42:39] ==> INFO: Installing MailParse for PHP 5.6.40...
BOA [22:42:49] ==> INFO: Installing YAML for PHP 5.6.40...
/opt/php56/bin/php: /usr/lib/libpng12.so.0: version `PNG12_0' not found (required by /opt/php56/bin/php)

BOA [22:43:14] ==> INFO: Aegir Master Instance upgrade skipped
BOA [22:43:18] ==> INFO: Running MySQLTuner check on all databases...
BOA [22:43:18] ==> NOTE! This step may take a LONG time, please wait...
BOA [22:43:23] ==> INFO: Restarting Jetty 9
BOA [22:43:28] ==> INFO: Restarting Redis, PHP-FPM and Nginx...
BOA [22:43:43] ==> INFO: Running MariaDB system tables upgrade, please wait...
BOA [22:43:45] ==> INFO: MariaDB diff0 empty
BOA [22:43:45] ==> INFO: MariaDB Uptime: 3 days 4 hours 1 min 25 sec
BOA [22:43:51] ==> INFO: Cleaning up system swap, it may take a moment...
BOA [22:43:55] ==> INFO: Upgrading csf/lfd firewall...
BOA [22:43:58] ==> TEST: csf/lfd firewall should work fine on this system
BOA [22:44:00] ==> INFO: csf/lfd firewall upgrade completed
BOA [22:44:00] ==> INFO: DNS cache pdnsd server re-installation forced
BOA [22:44:00] ==> INFO: Installing DNS cache pdnsd server...
BOA [22:44:37] ==> INFO: Building pdnsd 1.2.9a from sources, please wait...
BOA [22:45:37] ==> CARD: Now charging your credit card for this magic show...
BOA [22:45:40] ==> CARD: It will take a moment to process your payment...
BOA [22:45:46] ==> JOKE: Just kidding !!! Enjoy your Aegir Hosting System :)

BOA [22:45:50] ==> Final post-upgrade cleaning, one moment...
BOA [22:46:17] ==> BYE!

@omega8cc
Copy link
Owner

It will install 5.6 if you have any Octopus instance still running on 5.6, no matter what is defined I think.

@omega8cc
Copy link
Owner

We still need to fix that missing /usr/lib/libpng12.so.0 though.

@omega8cc
Copy link
Owner

Ah, that is actually the reason. PHP 5.6 upgrade fails because of missing libs, so it will try to install it on every upgrade.

@omega8cc
Copy link
Owner

omega8cc commented Jul 9, 2020

This no longer happens in any upgrade we have tried.

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

No branches or pull requests

2 participants