Solving RPM installation conflicts in CentOS 5 and CentOS 6

Lately we’ve had many reports of the RPM packages for CentOS 5 (mostly) and CentOS 6 having issues when installing different combinations of our products, particularly with Percona Toolkit for MySQL. Examples of bugs related to these issues are lp:1031427 and lp:1051874.

These problems arise when trying to install a package from the distribution that is linked against the version of libmysqlclient.so shipped by the distribution (libmysqlclient.so.15 for CentOS 5/libmysqlclient.so.16 for CentOS 6) and a version of Percona Server that depends on another version of libmysqlclient.so, usually more recent. Bug lp:1031427 is an example of this, and shows how the packages would conflict when trying to install libmysqlclient.so.

The traditional solution for this situation was to provide a special package, Percona-Server-shared-compat (modeled after upstream’s MySQL-shared-compat) which would contain ALL versions of libmysqlclient.so.* together and wouldn’t conflict. Probably some of you are familiar with this approach.

Notice how PS-shared-compat installs along the -shared package, providing the older libmysqlclient.so.16 required by php-mysql.

However, this has proved non-intuitive and problematic, since the shared-compat package wouldn’t get selected unless explicitely installed — and many of our users would rather have it “just work” without requiring additional knowledge of what the particular workaround was, etc..

We’re now trying a solution in which our -shared packages won’t conflict anymore at libmysqlclient.so, so we are able to install them side-by-side, modelled after the mysql-libs packages provided by CentOS/Redhat. So even if the user wants to install PS 5.5 alongside packages that depend on 5.1/5.0, the -shared packages will work together. For example installing 5.5 and postfix in CentOS:

In this case only Percona-Server-client-51 and Percona-Server-server-51 need be removed, allowing any package that depends on Percona-Server-shared-51 (providing libmysqlclient.so.16) to remain installed. After the server and client packages are uninstalled, you can install PS 5.5 without conflict.

The current package candidates for versions 5.0.92 (which required an update), 5.1.67-14.3 and 5.5.29-29.4 can be tested from the percona-testing repository. We encourage you to try these out and send us your feedback and/or file any bugs you find.

We’re aiming to include these fixes in our next releases of Percona Toolkit 5.1 and Percona Toolkit 5.5. Percona Toolkit users in particular will enjoy this update since it’ll mean no more trouble when installing it from repository!

Categories:

Comments

guly

this is not limited to centos, i had some issues also on debian/ubuntu (don’t know if latest packages works better for dependencies, sorry). while you’re fixing rpm spec file, could you please have a look also to deb ? thanks

hailong guo

hello, nice to meet you! now,i meet a trouble and need your help! i setup percona cluster in vm, if in file /etc/my.cnf,i add wsrep_cluster_address=gcomm:// to fill it ,the mysql server will not running

key_buffer_size=0 read_buffer_size=131072 max_used_connections=0 max_threads=151 thread_count=0 connection_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 329809 K bytes of memory Hope that’s ok; if not, decrease some variables in the equation.

Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong… stack_bottom = 0 thread_stack 0x30000 /usr/sbin/mysqld(my_print_stacktrace+0x33)[0x8415893] /usr/sbin/mysqld(handle_fatal_signal+0x48c)[0x82dee3c] [0x8e8420] /lib/libc.so.6(abort+0x101)[0xb1a701] /usr/lib/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x150)[0x710bab0] /usr/lib/libstdc++.so.6[0x7109515] /usr/lib/libstdc++.so.6[0x7109552] /usr/lib/libstdc++.so.6[0x710968a] /usr/lib/libgalera_smm.so(_ZNK2gu3URI10get_optionERKSs+0xf6)[0xe180b6] /usr/lib/libgalera_smm.so(_ZN5gcomm5paramIN2gu8datetime6PeriodEEET_RNS1_6ConfigERKNS1_3URIERKSsSB_PFRSt8ios_baseSD_E+0xfc)[0xe80e9c] /usr/lib/libgalera_smm.so(_ZN5gcomm2PCC2ERNS_8ProtonetERKN2gu3URIE+0xc2)[0xea03d2] /usr/lib/libgalera_smm.so(_ZN5gcomm9Transport6createERNS_8ProtonetERKN2gu3URIE+0x2be)[0xebbece] /usr/lib/libgalera_smm.so(_ZN9GCommConn7connectERKSs+0xeb)[0xf07d8b] /usr/lib/libgalera_smm.so[0xf04970] /usr/lib/libgalera_smm.so(gcs_core_open+0x88)[0xefa248] /usr/lib/libgalera_smm.so(gcs_open+0x2c8)[0xf01028] /usr/lib/libgalera_smm.so(_ZN6galera13ReplicatorSMM7connectERKSsS2_S2_+0x2b4)[0xf49904] /usr/lib/libgalera_smm.so(galera_connect+0xae)[0xf6675e] /usr/sbin/mysqld(_Z23wsrep_start_replicationv+0x107)[0x8294897] /usr/sbin/mysqld(_Z18wsrep_init_startupb+0x7c)[0x829551c] /usr/sbin/mysqld[0x813d7ec] /usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x81a)[0x8140c0a] /usr/sbin/mysqld(main+0x27)[0x8132e67] /lib/libc.so.6(__libc_start_main+0xdc)[0xb05e9c] /usr/sbin/mysqld[0x8132d81] You may download the Percona Server operations manual by visitinghttps://www.percona.com/software/percona-server/. You may find information in the manual which will help you identify the cause of the crash. 130221 17:59:06 mysqld_safe mysqld from pid file /var/lib/mysql/mysql1.pid ended

What we (openSUSE) do is that ‘*.so’ file is only in devel package and libraries are in ‘various packages with shared libraries each one providing only ‘*.so.*’ files. Unfortunatelly that doesn’t solve problems if you have multiple libraries with same version like having distribution compiling against Oracles MySQL (and wanting to play it safe) and wanting to use MariaDB. I ended up with renaming the library on non-default databases, just to be sure…

I am unable to use percona toolkit utilities because of its dependencies and its conflicts (see example below)

pt-table-checksum 04-15T14:29:36 Cannot connect to MySQL because the Perl DBD::mysql module is not installed or not found. Run ‘perl -MDBD::mysql’ to see the directories that Perl searches for DBD::mysql. If DBD::mysql is not installed, try: Debian/Ubuntu apt-get install libdbd-mysql-perl RHEL/CentOS yum install perl-DBD-MySQL OpenSolaris pgk install pkg:/SUNWapu13dbd-mysql

I am unable to install percona xtrabackup because of dependencies and conflicts again