LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem installing mcrypt (https://www.linuxquestions.org/questions/linux-newbie-8/problem-installing-mcrypt-4175414642/)

johniem 07-03-2012 08:27 AM

Problem installing mcrypt
 
I'm trying to install mcrypt inmy server with no luck so far.

Code:

# php -v
PHP 5.2.17 (cli) (built: Jan  7 2011 10:39:29)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.

# cat /etc/issue
CentOS release 5.7 (Final)
Kernel \r on an \m

I have removed all repos from /etc/yum.repos.d/ except atomic. I have tried to install mcrypt from epel repo too but although the installation was successful the extension didn't work.

here is the output when i'm trying to install from atomic

Code:

# yum install php-mcrypt.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * atomic: www7.atomicorp.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.3.14-6.el5.art set to be updated
--> Processing Dependency: php-common = 5.3.14-6.el5.art for package: php-mcrypt
--> Running transaction check
--> Processing Dependency: php-common = 5.2.17-1.el5.art for package: php-gd
--> Processing Dependency: php-common = 5.2.17-1.el5.art for package: php-xml
--> Processing Dependency: php-common = 5.2.17-1.el5.art for package: php-mbstring
--> Processing Dependency: php-common = 5.2.17-1.el5.art for package: php-mysql
--> Processing Dependency: php-common = 5.2.17-1.el5.art for package: php
--> Processing Dependency: php-common = 5.2.17-1.el5.art for package: php-imap
--> Processing Dependency: php-common = 5.2.17-1.el5.art for package: php-pdo
--> Processing Dependency: php-common = 5.2.17-1.el5.art for package: php-cli
---> Package php-common.x86_64 0:5.3.14-6.el5.art set to be updated
--> Running transaction check
--> Processing Dependency: php = 5.2.17-1.el5.art for package: php-devel
---> Package php.x86_64 0:5.3.14-6.el5.art set to be updated
--> Processing Dependency: libedit.so.0()(64bit) for package: php
---> Package php-cli.x86_64 0:5.3.14-6.el5.art set to be updated
---> Package php-gd.x86_64 0:5.3.14-6.el5.art set to be updated
---> Package php-imap.x86_64 0:5.3.14-6.el5.art set to be updated
---> Package php-mbstring.x86_64 0:5.3.14-6.el5.art set to be updated
---> Package php-mysql.x86_64 0:5.3.14-6.el5.art set to be updated
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: php-mysql
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql
---> Package php-pdo.x86_64 0:5.3.14-6.el5.art set to be updated
---> Package php-xml.x86_64 0:5.3.14-6.el5.art set to be updated
--> Running transaction check
---> Package libedit.x86_64 0:3.0-2.20090923cvs.el5.art set to be updated
---> Package mysql-libs.x86_64 0:5.5.25-7.el5.art set to be updated
---> Package php-devel.x86_64 0:5.3.14-6.el5.art set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================
 Package                                  Arch                                Version                                                Repository                          Size
=================================================================================================================================================================================
Installing:
 php-mcrypt                                x86_64                              5.3.14-6.el5.art                                        atomic                              48 k
Installing for dependencies:
 libedit                                  x86_64                              3.0-2.20090923cvs.el5.art                              atomic                              81 k
 mysql-libs                                x86_64                              5.5.25-7.el5.art                                        atomic                              1.1 M
Updating for dependencies:
 php                                      x86_64                              5.3.14-6.el5.art                                        atomic                              2.8 M
 php-cli                                  x86_64                              5.3.14-6.el5.art                                        atomic                              2.6 M
 php-common                                x86_64                              5.3.14-6.el5.art                                        atomic                              1.0 M
 php-devel                                x86_64                              5.3.14-6.el5.art                                        atomic                              1.3 M
 php-gd                                    x86_64                              5.3.14-6.el5.art                                        atomic                              209 k
 php-imap                                  x86_64                              5.3.14-6.el5.art                                        atomic                              88 k
 php-mbstring                              x86_64                              5.3.14-6.el5.art                                        atomic                              2.3 M
 php-mysql                                x86_64                              5.3.14-6.el5.art                                        atomic                              95 k
 php-pdo                                  x86_64                              5.3.14-6.el5.art                                        atomic                              120 k
 php-xml                                  x86_64                              5.3.14-6.el5.art                                        atomic                              225 k

Transaction Summary
=================================================================================================================================================================================
Install      3 Package(s)
Upgrade      10 Package(s)

Total size: 12 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test


Transaction Check Error:
  file /etc/my.cnf from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/charsets/Index.xml from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/charsets/cp1250.xml from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/charsets/cp1251.xml from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/czech/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/danish/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/dutch/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/english/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/estonian/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/french/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/german/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/greek/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/hungarian/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/italian/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/japanese/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/korean/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/norwegian-ny/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/norwegian/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/polish/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/portuguese/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/romanian/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/russian/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/serbian/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/slovak/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/spanish/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/swedish/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64
  file /usr/share/mysql/ukrainian/errmsg.sys from install of mysql-libs-5.5.25-7.el5.art.x86_64 conflicts with file from package mysql-5.0.77-4.el5_6.6.x86_64

Error Summary
-------------

the same error generates with yum install php-mcrypt too. Any help would be really appreciated.

Thanks in advance.

Kustom42 07-03-2012 01:46 PM

Ok so here is what you need to do....

Upgrade PHP, MySQL and then install php-mcrypt.

Issue here is that it's trying ot upgrade php-common and mysql libs to match the dependencies, the transaction check sees you are on php 5.2/mysql 5.0.77 and that the upgrade will break these packages. Run the following in sequence as the root user:

Code:

yum upgrade php mysql #go through entire install to get to PHP 5.3 and MySQL 5.1 USE THE ATOMIC REPO!
mysql_upgrade -uroot -p #Upgrade your mysql tables to the current version
mysqlcheck -Aro -uroot -p #Repair/optimize tables to remove any overhead or anything left behind from the upgrade
yum install php-mcrypt #Finally, you can install mcrypt.


johniem 07-03-2012 02:26 PM

I don't have any problem upgrading php and MySQL but there are 10 sites live on that server and plesk 9.5 too. I don't know if the upgrades would have any impact to all of these.

Kustom42 07-03-2012 02:30 PM

Nope, I already knew you were on Plesk from your outputs and I have done literally thousands of these. When a customer would pay me to upgrade PHP or install mcrypt it always had to have a mysql upgrade as well if you are going from 5.2 to 5.3.

If you really want to be on the safe side you could do a plesk backup. I always made a backup as its good admin practice but in all the upgrades/installs I did I never had to roll one back.

If you copy and paste the commands as given and make sure to use the Atomic Repo(this is the repo you should always use with Plesk packages) then you will see no impact. I would categorize the potential risk and impact of the commands given as very low.


http://myhosting.com/kb/How_to_Backu...Files_in_Plesk


All times are GMT -5. The time now is 11:38 PM.