Unable to load dynamic library 'apc.so'

General support questions
Post Reply
tenchoe
Posts: 1
Joined: 2019/08/08 17:18:37

Unable to load dynamic library 'apc.so'

Post by tenchoe » 2019/08/08 17:29:30

Hello there,

I was helping a friend to upgrade the php version from 5 to 7.

It went successful.

However, when i type php --version

I am getting this error message.
PHP Warning: PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib64/php/modules/apc.so (/usr/lib64/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/apc.so.so (/usr/lib64/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) in Unknownon line 0PHP 7.2.21 (cli) (built: Jul 30 2019 15:00:44) ( NTS )

I thought whether after httpd service restart the problem will disappear but I got this error
Starting httpd: httpd: Syntax error on line 17 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory

I am a noob and had googled and searched forums... but was not able to find a viable solution. Few links of manually create apc.so was there but I can't make the file (using make command). I am afraid whether I am heading to right direction..

your help is highly appreciateed!

Regards,
Tenchoe

User avatar
TrevorH
Forum Moderator
Posts: 27175
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to load dynamic library 'apc.so'

Post by TrevorH » 2019/08/08 17:43:32

How exactly did you "upgrade the php version from 5 to 7"? If it involved any of tar, make, gcc then you did it wrong.

You can find php 7.x packages in various repos including IUS and SCL. IUS is designed to entirely replace the distro php 5.3.3 and SCL is designed to install the newer version in parallel so you can run either/both at the same time. No-one supplies php 7.2 for CentOS 6 which is the forum you are posting in - are you running CentOS 6 or 7?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Whoever
Posts: 1089
Joined: 2013/09/06 03:12:10

Re: Unable to load dynamic library 'apc.so'

Post by Whoever » 2019/08/09 07:30:27

tenchoe wrote:
2019/08/08 17:29:30
Hello there,

I was helping a friend to upgrade the php version from 5 to 7.

It went successful.

However, when i type php --version

I am getting this error message.
PHP Warning: PHP Startup: Unable to load dynamic library 'apc.so' (tried: /usr/lib64/php/modules/apc.so (/usr/lib64/php/modules/apc.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/apc.so.so (/usr/lib64/php/modules/apc.so.so: cannot open shared object file: No such file or directory)) in Unknownon line 0PHP 7.2.21 (cli) (built: Jul 30 2019 15:00:44) ( NTS )
That's obviously some use of the word "successful" that I haven't come across before.

daberelay
Posts: 1
Joined: 2019/10/10 11:52:30

Re: Unable to load dynamic library 'apc.so'

Post by daberelay » 2019/10/10 11:53:35

did you manage to solve this? I'm having the same issue here with CentOS 7 and php 7.3

Post Reply

Return to “CentOS 6 - General Support”