Vm: Unable to load dynamic library 'redis.so'

Created on 22 May 2018  ยท  25Comments  ยท  Source: nextcloud/vm

Fresh installed latest Nextcloud VM 13 has an error in system logs:
PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20170718/redis.so (/usr/lib/php/20170718/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20170718/redis.so.so (/usr/lib/php/20170718/redis.so.so: cannot open shared object file: No such file or directory)) at Unknown#0

Most helpful comment

From my point of view, outdated PHP package php-igbinary (2.x) may cause that issue /usr/lib/php/20180731/redis.so: undefined symbol: igbinary_serialize

root@home:# dpkg -l | grep php

php-igbinary                         2.0.6~rc1-1+ubuntu16.04.1+deb.sury.org+1
php-redis                            4.3.0-1+ubuntu16.04.1+deb.sury.org+1

Solution is re-install both php-redis & php-igbinary

root@home:# apt install php-redis php-igbinary
...

After that, they're working smootly. Here is new version of php-igbinary

php-igbinary                         3.0.1+2.0.8-1+ubuntu16.04.1+deb.sury.org+1
php-redis                            4.3.0-1+ubuntu16.04.1+deb.sury.org+1

All 25 comments

Thanks for your report, it's a known error but nothing that affects Redis afaik, just an aesthetic failure.

I think this issue will solve itself once all the dependencies are updated in Ubuntu 18.04.

Found this: https://bugs.launchpad.net/ubuntu/+source/php-redis/+bug/1762935

Seems like a bug in Ubuntu 18.04.

well why should this be a Ubuntu error while the redis.so shared library still exists?

ls -al /usr/lib/php/20170718/ | grep redis
-rw-r--r-- 1 root root 408640 Feb 3 04:54 redis.so

{"reqId":"4vQlOzd8ZeOs222GykBn","level":3,"time":"2018-05-23T08:45:12+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"XXXXXXX-9E75-49A7-BD9A-EC5F237C1150","app":"PHP","method":"PROPFIND","url":"\/remote.php\/dav\/files\/XXXXXXXX-9E75-49A7-BD9A-EC5F237C1150\/","message":"PHP Startup: Unable to load dynamic library 'redis.so' (tried: \/usr\/lib\/php\/20170718\/redis.so (\/usr\/lib\/php\/20170718\/redis.so: undefined symbol: igbinary_serialize), \/usr\/lib\/php\/20170718\/redis.so.so (\/usr\/lib\/php\/20170718\/redis.so.so: cannot open shared object file: No such file or directory)) at Unknown#0","userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.2.1"}

should this really named to /usr/lib/php/20170718/redis.so.so ???

also there is a difference in the howto compared to the vm build process:

https://docs.nextcloud.com/server/13/admin_manual/configuration_server/caching_configuration.html

ps ax | grep redis
3360 ? Ssl 4:39 /usr/bin/redis-server 127.0.0.1:0
27205 pts/0 S+ 0:00 grep --color=auto redis

'memcache.local' => '\OC\Memcache\Redis',
'filelocking.enabled' => true,
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.5,
'dbindex' => 0,
'password' => 'STRONGPASSWORDWASUSEDHERE',
),

@fgrosswig Have you checked the redis script that installs redis in this VM? If you had you would have noticed that this is how it's installed:

# Install Redis
install_if_not php-redis
install_if_not redis-server

So in other words, the needed dependencies are installed as igbinary_serialize is included as a dependency to php-redis.

This is the "recommended" config lines from documentation:

'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
     'host' => '/var/run/redis/redis.sock',
     'port' => 0,
     'dbindex' => 0,
     'password' => 'secret',
     'timeout' => 1.5,
      ),

And this is from the VM:

  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '$REDIS_SOCK',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 0,
    'password' => '$REDIS_PASS',
  ),

What do you think differ? We had an issue before regarding changing the timeout. Before that change it was 0.0 but the one who posted the issue helped me test and our conclusion was that 0.5 is the best. Remember tht the docs may be outdated as they are not maintained as frequently, especially compared to the VM which is used by several tens of thousands of people around the world.

I think it's a Ubuntu bug because:

  1. The filename is wrong (as you noticed)
  2. It says that a dependency is missing even if it's installed.

If you want to debug it that would be great, any help is welcome as my time is limited.

Yes used the script right away and now processing this error:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I don't understand why things will be move or suggested since i used the VM installer script.

Currently this above broke my complete cloud ... well done

Well, I didn't break your cloud, neither did the scripts. What do you want to achieve with that comment? I do this on my spare time, and you can download and use the VM and scripts for free. That's giving back to the community. Sorry, but what have you done so far?

As a little background story... I wanted an easy way to install ownCloud (back in 2013) and got the question from Frank and others to help out with a VM. What we ended up with was a VM much based on the same scripts I used for my own installation.

Since then the VM has developed to become what it is today, and my own Nextcloud installation (and all of my customers VMs) are based on the same scripts that you are saying is giving you an internal server error. Not likely since I never ever got any internal server error just by using the scripts. I always test the releases thourohly before they are packaged and released. I also do several installations with the scripts per week for customers and others that wants to benefit from Nextcloud.

Now on the topic...

will be move or suggested since i used the VM installer script.

The VM is based on shell scripts which installs different packages and configures everything for the end user so that you don't have to do it manually. If the packages that are installed are broken, or if there are errors in the Nextcloud code, you should report your issue in that repository/bugtracker - not in this repo as the only thing we do is install packages and configures it. So if there's an error in php-redis then you will see error messages as you just posted. I saw the same log entries as you before the release, but since everything is working and Nextcloud reports that Redis is installed and working I don't see the real issue here. That's why I wrote:

it's a known error but nothing that affects Redis afaik, just an aesthetic failure.

Feel free to send your PR to fix this issue, or investigate why it happens. Thanks!

Off topic starts here ---

This is what i can't understand ... Lets elaborate on this a bit more. I don't tell you on which dev tracks i am on and can't spend all the time to resolve or debug issues on different projects i only take part as dumb user. Here, so I, people ask for problems with the scripting installer on a fresh clean system. All what comes back is to be argued what people blame and don't take part to the track. Sorry this isn't the right path people to blame. If a developer gets feedback with hints and logs and furthermore infos why people get upset and blaming them for? Isn't this a win win situation for both? People try to solve the issues and help dev or app teams to solve their problems in a a way they can and issues get solved? So if one decided to get their valued work for nothing except honor to the main public stream then he has the choice to accept to investigate or close the branch. So whats you direction?

-- Off topic end --

Currently i am not able to connect back to the VM nextcloud and i have no idea where to start over. This might be the lack of sufficient knowledge to the dependencies. I either don't know why redis is running on socket instead on port where the apache error log hints out the redis isn't accessible over the standard port. The thing is I didn't configured redis on socket it does the script itself. So now i am on the current situation to re-done the whole server setup due i don't know where to discover the internal "500" error.

If you use the scripts to do the installation without changing anything by yourself - it works. If you feel that you are confident with Linux, well, then hack away. I can't take responsibility for configuration errors made by the user. And to be quite frank, it's frustrating when people (like you) point fingers blaming me or the development when they've changed the configuration themselves. "What does this button do?" - POFF It exploded.... Just follow the instructions and you'll be fine.

I know for a fact that it works out of the box. Also what you should have done is to fill out the issue_template or at least tell me in which environment you are trying to install this in. I know that Xen-servers have issue deploying the OVA for example.

as mentioned ... i used the scripts and didn't made changes to it. its a clean and fresh installation on Ubuntu 18.04 LTS. Why not accepting that the script or the bundles and their dependencies might have issues event if it works for you or in general?? no option for you? also i don't understand why you get upset? If i would ever get upset on my branches i am working on i rather would close it not get in touch with people they blame the code... neither i do only asking why things not work as intended and throws errors and fill logs if the error might solved? hmmm interesting approach

but i figured the error on my own. The above script generates a new password for the redis-server which will not be updated in a current server redis.conf file. But the script does add a new redis configuration section to the nextcloud config.php file at the end. Resulting not to update or to delete either previous config section or redis config file with a new password gives the 500 error in this particular case. But this doesn't solve the issue with the redis php problem. i added a symlink to the existing redis.so file to redis.so.so. maybe this sorted it out. however i don't feel community treated -.-

@fgrosswig Sorry, not my intention to be annoying or that you think that I'm upset - I'm not actually.

Ofc I don't want the logs to be spammed, and I've tried to explain to you in detail how it works. Still, you don't answer my questions... For example:

What do you think differ?

Just saying "It doesn't work" doesn't help me much. If you truly want to help, then help me debugging instead. :)

Currently this above broke my complete cloud ... well done

The script are intended to be run once. Why would you want to change an already strong password? And ofc you need to change the password in both places if you do want to change it to your own. Redis is installed in the first script and there sets all the needed values. Why use the script if redis already is installed?

So do you still think it was the scripts fault your cloud broke?

Why not accepting that the script or the bundles and their dependencies might have issues event if it works for you or in general??

Let me remind you of what I wrote earlier:

The VM is based on shell scripts which installs different packages and configures everything for the end user so that you don't have to do it manually. If the packages that are installed are broken, or if there are errors in the Nextcloud code, you should report your issue in that repository/bugtracker - not in this repo as the only thing we do is install packages and configures it. So if there's an error in php-redis then you will see error messages as you just posted. I saw the same log entries as you before the release, but since everything is working and Nextcloud reports that Redis is installed and working I don't see the real issue here. That's why I wrote: it's a known error but nothing that affects Redis afaik, just an aesthetic failure.

however i don't feel community treated -.-

Sorry for that. It's not until the last years I realized how much work are behind open-source projects. I was like you in the beginning - reporting bugs without proper information (like this example where you just posted a log section), blaming others when it was my own fault (I'm referring to configuration changes I made that broke my install), and got annoyed when stuff didn't got fixed. I learned my lesson, or rather understand now with this project how much time that really goes in maintaining something like this.

I hope you improve soon as well.

Ubuntu 18.04 was just released (I also stated why I think it's an Ubuntu bug) and maybe I released it too soon. That's on me. Script-wise everything works though but you make it sound like this is crap. That's why I wrote like I did.

But this doesn't solve the issue with the redis php problem

That's true. At the same time it isn't a real problem as nothing is affected by it afaik, it just spams the log. Believe me, I've monitored redis while browsing, double and triple checked.

All the best to you @fgrosswig. I don't feel like trying to explain more. Please send me an email if you have further complaints. This time, please make sure that they are valid.

@fgrosswig , so, symlink to the existing redis.so file to redis.so.so resolved the issue?

so, symlink to the existing redis.so file to redis.so.so resolved the issue?

It may work as a workaround but it's definitely not a proper solution.

no i don't think so because the apache throws still the error, but in general to agree with @enoch85 this won't be a issue within nextcloud vm.

apache2 error log:

[Thu May 24 07:51:44.125407 2018] [http2:warn] [pid 32336] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20170718/redis.so (/usr/lib/php/20170718/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20170718/redis.so.so (/usr/lib/php/20170718/redis.so.so: undefined symbol: igbinary_serialize)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20170718/redis.so (/usr/lib/php/20170718/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20170718/redis.so.so (/usr/lib/php/20170718/redis.so.so: undefined symbol: igbinary_serialize)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20170718/redis.so (/usr/lib/php/20170718/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20170718/redis.so.so (/usr/lib/php/20170718/redis.so.so: undefined symbol: igbinary_serialize)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20170718/redis.so (/usr/lib/php/20170718/redis.so: undefined symbol: igbinary_serialize), /usr/lib/php/20170718/redis.so.so (/usr/lib/php/20170718/redis.so.so: undefined symbol: igbinary_serialize)) in Unknown on line 0

* still investigating this issue with Ubuntu 18.04 LTS

@fgrosswig

* still investigating this issue with Ubuntu 18.04 LTS

Thanks!

ok i might found a proper solution to this.

i have done this under Ubuntu 18.04 LTS:

apt-get install php7.2-dev
pecl install redis

downloading redis-4.0.2.tgz ...
Starting to download redis-4.0.2.tgz (212,617 bytes)
.............done: 212,617 bytes
24 source files, building
running: phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
enable igbinary serializer support? [no] : yes
enable lzf compression support? [no] : no
building in /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2
running: /tmp/pear/temp/redis/configure --with-php-config=/usr/bin/php-config --enable-redis-igbinary=yes --enable-redis-lzf=no
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20170718
checking for PHP installed headers prefix... /usr/include/php/20170718
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable redis support... yes, shared
checking whether to enable sessions... yes
checking whether to enable igbinary serializer support... yes
checking whether to enable lzf compression... no
checking use system liblzf... no
checking for igbinary includes... /usr/include/php/20170718
checking for redis igbinary support... enabled
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/x86_64-linux-gnu-ld
checking if the linker (/usr/bin/x86_64-linux-gnu-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/x86_64-linux-gnu-ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) gawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/x86_64-linux-gnu-ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/redis/redis.c -o redis.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/redis/redis.c  -fPIC -DPIC -o .libs/redis.o
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/redis/redis_commands.c -o redis_commands.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/redis/redis_commands.c  -fPIC -DPIC -o .libs/redis_commands.o
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/redis/library.c -o library.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/redis/library.c  -fPIC -DPIC -o .libs/library.o
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/redis/redis_session.c -o redis_session.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/redis/redis_session.c  -fPIC -DPIC -o .libs/redis_session.o
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/redis/redis_array.c -o redis_array.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/redis/redis_array.c  -fPIC -DPIC -o .libs/redis_array.o
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/redis/redis_array_impl.c -o redis_array_impl.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/redis/redis_array_impl.c  -fPIC -DPIC -o .libs/redis_array_impl.o
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/redis/redis_cluster.c -o redis_cluster.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/redis/redis_cluster.c  -fPIC -DPIC -o .libs/redis_cluster.o
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=compile cc  -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/redis/cluster_library.c -o cluster_library.lo
libtool: compile:  cc -I. -I/tmp/pear/temp/redis -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/redis/cluster_library.c  -fPIC -DPIC -o .libs/cluster_library.o
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=link cc -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/include -I/tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/main -I/tmp/pear/temp/redis -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/include/php/20170718/ext  -DHAVE_CONFIG_H  -g -O2   -o redis.la -export-dynamic -avoid-version -prefer-pic -module -rpath /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/modules  redis.lo redis_commands.lo library.lo redis_session.lo redis_array.lo redis_array_impl.lo redis_cluster.lo cluster_library.lo
libtool: link: cc -shared  -fPIC -DPIC  .libs/redis.o .libs/redis_commands.o .libs/library.o .libs/redis_session.o .libs/redis_array.o .libs/redis_array_impl.o .libs/redis_cluster.o .libs/cluster_library.o    -g -O2   -Wl,-soname -Wl,redis.so -o .libs/redis.so
libtool: link: ( cd ".libs" && rm -f "redis.la" && ln -s "../redis.la" "redis.la" )
/bin/bash /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/libtool --mode=install cp ./redis.la /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/modules
libtool: install: cp ./.libs/redis.so /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/modules/redis.so
libtool: install: cp ./.libs/redis.lai /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/modules/redis.la
libtool: finish: PATH="/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin" ldconfig -n /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /tmp/pear/temp/pear-build-rootDDB4jL/redis-4.0.2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

Build complete.
Don't forget to run 'make test'.

running: make INSTALL_ROOT="/tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2" install
Installing shared extensions:     /tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2/usr/lib/php/20170718/
running: find "/tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2" | xargs ls -dils
1058475    4 drwxr-xr-x 3 root root    4096 Mai 24 08:16 /tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2
1058511    4 drwxr-xr-x 3 root root    4096 Mai 24 08:16 /tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2/usr
1058512    4 drwxr-xr-x 3 root root    4096 Mai 24 08:16 /tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2/usr/lib
1058513    4 drwxr-xr-x 3 root root    4096 Mai 24 08:16 /tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2/usr/lib/php
1058514    4 drwxr-xr-x 2 root root    4096 Mai 24 08:16 /tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2/usr/lib/php/20170718
1058509 1844 -rwxr-xr-x 1 root root 1886496 Mai 24 08:16 /tmp/pear/temp/pear-build-rootDDB4jL/install-redis-4.0.2/usr/lib/php/20170718/redis.so

Build process completed successfully
Installing '/usr/lib/php/20170718/redis.so'
install ok: channel://pecl.php.net/redis-4.0.2
configuration option "php_ini" is not set to php.ini location
You should add "extension=redis.so" to php.ini
Segmentation fault (core dumped)

why segmentation faulted here i don't know, maybe it ended cleanly without errors and the new extension was added to /usr/lib/php/20170718/.

Attention: This above adds multiple times in /etc/php/7.2/apache2/php.ini the extension to load ad the end of the file. Apache will let you know this like this:

[Thu May 24 08:25:58.749846 2018] [http2:warn] [pid 7718] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.
PHP Warning:  Module 'redis' already loaded in Unknown on line 0
PHP Warning:  Module 'redis' already loaded in Unknown on line 0
PHP Warning:  Module 'redis' already loaded in Unknown on line 0
PHP Warning:  Module 'redis' already loaded in Unknown on line 0

so just remove the multiple entries due its loaded already in the ini files through:

/etc/php/7.2/cli/conf.d/
and
/etc/php/7.2/apache2/conf.d/

This solved my issues with the missing redis.so library thing and all errors went off.

root@host: php -m
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
imap
intl
json
ldap
libsmbclient
libxml
mbstring
msgpack
openssl
pcntl
pcre
PDO
pdo_pgsql
pgsql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
smbclient
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache
root@host:# php --ini
php --ini
Configuration File (php.ini) Path: /etc/php/7.2/cli
Loaded Configuration File:         /etc/php/7.2/cli/php.ini
Scan for additional .ini files in: /etc/php/7.2/cli/conf.d
Additional .ini files parsed:      /etc/php/7.2/cli/conf.d/10-opcache.ini,
/etc/php/7.2/cli/conf.d/10-pdo.ini,
/etc/php/7.2/cli/conf.d/15-xml.ini,
/etc/php/7.2/cli/conf.d/20-calendar.ini,
/etc/php/7.2/cli/conf.d/20-ctype.ini,
/etc/php/7.2/cli/conf.d/20-curl.ini,
/etc/php/7.2/cli/conf.d/20-dom.ini,
/etc/php/7.2/cli/conf.d/20-exif.ini,
/etc/php/7.2/cli/conf.d/20-fileinfo.ini,
/etc/php/7.2/cli/conf.d/20-ftp.ini,
/etc/php/7.2/cli/conf.d/20-gd.ini,
/etc/php/7.2/cli/conf.d/20-gettext.ini,
/etc/php/7.2/cli/conf.d/20-iconv.ini,
/etc/php/7.2/cli/conf.d/20-igbinary.ini,
/etc/php/7.2/cli/conf.d/20-imagick.ini,
/etc/php/7.2/cli/conf.d/20-imap.ini,
/etc/php/7.2/cli/conf.d/20-intl.ini,
/etc/php/7.2/cli/conf.d/20-json.ini,
/etc/php/7.2/cli/conf.d/20-ldap.ini,
/etc/php/7.2/cli/conf.d/20-mbstring.ini,
/etc/php/7.2/cli/conf.d/20-msgpack.ini,
/etc/php/7.2/cli/conf.d/20-pdo_pgsql.ini,
/etc/php/7.2/cli/conf.d/20-pgsql.ini,
/etc/php/7.2/cli/conf.d/20-phar.ini,
/etc/php/7.2/cli/conf.d/20-posix.ini,
/etc/php/7.2/cli/conf.d/20-readline.ini,
/etc/php/7.2/cli/conf.d/20-redis.ini,
/etc/php/7.2/cli/conf.d/20-shmop.ini,
/etc/php/7.2/cli/conf.d/20-simplexml.ini,
/etc/php/7.2/cli/conf.d/20-smbclient.ini,
/etc/php/7.2/cli/conf.d/20-sockets.ini,
/etc/php/7.2/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.2/cli/conf.d/20-sysvsem.ini,
/etc/php/7.2/cli/conf.d/20-sysvshm.ini,
/etc/php/7.2/cli/conf.d/20-tokenizer.ini,
/etc/php/7.2/cli/conf.d/20-wddx.ini,
/etc/php/7.2/cli/conf.d/20-xmlreader.ini,
/etc/php/7.2/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.2/cli/conf.d/20-xsl.ini,
/etc/php/7.2/cli/conf.d/20-zip.ini

My issue solved by removing extension=redis.io from php.iniand restarting the php process and apache.

My issue solved by removing extension=redis.io from php.iniand restarting the php process and apache.

The best solution, thanks.

From my point of view, outdated PHP package php-igbinary (2.x) may cause that issue /usr/lib/php/20180731/redis.so: undefined symbol: igbinary_serialize

root@home:# dpkg -l | grep php

php-igbinary                         2.0.6~rc1-1+ubuntu16.04.1+deb.sury.org+1
php-redis                            4.3.0-1+ubuntu16.04.1+deb.sury.org+1

Solution is re-install both php-redis & php-igbinary

root@home:# apt install php-redis php-igbinary
...

After that, they're working smootly. Here is new version of php-igbinary

php-igbinary                         3.0.1+2.0.8-1+ubuntu16.04.1+deb.sury.org+1
php-redis                            4.3.0-1+ubuntu16.04.1+deb.sury.org+1

@hieuhtr Is this on Ubuntu 16.04?

3.0.1+2.0.8-1+ubuntu16.04.1+deb.sury.org+1

@enoch85 this php-igbinary 3.0.1 is latest version on both Ubuntu 16.04 & 18.04, FYI

@hieuhtr Isn't that installed by default? The latest version should always be the one installing in a fresh system, and you should get it when updating. You mean that's not the case?

Try reinstall the php-igbinary and then:
# echo extension=igbinary.so >> igbinary.ini

@enoch85 this php-igbinary 3.0.1 is latest version on both Ubuntu 16.04 & 18.04, FYI

This fix my problem on Ubuntu 16.04. Thanks.

Since a while back we now install the latest php-igbinary from PECL.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

thejohnha picture thejohnha  ยท  8Comments

unamundan picture unamundan  ยท  6Comments

rakekniven picture rakekniven  ยท  7Comments

dseeker picture dseeker  ยท  4Comments

silverdr picture silverdr  ยท  6Comments