Results 1 to 3 of 3
My problem, in a nutshell, is that I can't update perl from 5.8.5 to 5.8.6 without breaking Mandrake. I'm running:
Code:
# cat /etc/mandrake-release
Mandrakelinux release 10.1 (Official) for i586
...
- 01-15-2006 #1Just Joined!
- Join Date
- Oct 2005
- Posts
- 5
How to safely update perl? (Without breaking Mandrake's URPMI and drake*...)
My problem, in a nutshell, is that I can't update perl from 5.8.5 to 5.8.6 without breaking Mandrake. I'm running:
When I try to install MySQL, it says perl-base-5.8.6-6.2..102mdk.i586 is required. But when that gets installed, URPMI breaks and so do all the "drake" tools (drakconf, rpmdrake, etc.), because all of these require perl to work. So after doingCode:# cat /etc/mandrake-release Mandrakelinux release 10.1 (Official) for i586
I'll get errors like:Code:# urpmi MySQL
Because the perl installation is broken. I've had this problem before, so I know how to restore myself back to my old perl installation, which will make everything work as before. Refer to:Can't locate URPM.pm in @INC (@INC contains: /usr/lib/perl5/5.8.6/i386-linux /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i386-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.6/i386-linux /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/vendor_perl/5.8.5/urpm.pm line 16.
/forum/mandriva-linux/37355-eorror-urpmi-perl.html
For my previous post on how I reverted back to my previous perl installation.
But how can I actually upgrade my perl installation to 5.8.6 without everything breaking! What is the "safe" way to upgrade perl in Mandrake (considering that so many Mandrake tools rely on perl)?
My guess is that the problem occurs precisely because URPMI uses perl, and so it has trouble updating itself. So I decided to try installing the newer perl using "rpm" instead of "urpmi":
But the same problem arises. So perhaps I need to update URPMI using "rpm" also? (And then what about the drake tools?) I'm a little worried about making so many "manual" changes to the system. It's obviously better to let urpmi take care of them as much as possible.Code:# rpm -Uhv perl-base-5.8.6-6.2.102mdk.i586.rpm --nodeps # rpm -Uhv perl-5.8.6-6.2.102mdk.i586.rpm
Have other Mandrake users not run into this problem? Is there any fix or workaround? Any help would be greatly appreciated. Please note that this particular box runs as a server for various things, so rebooting it is a last resort.
- 01-15-2006 #2Just Joined!
- Join Date
- Oct 2005
- Posts
- 5
Update on my problem...
Update:
I have not figured out any way to upgrade perl, which is quite bothersome. I found other posts online describing similar problems:
http://www.linuxquestions.org/questi...hreadid=317728
http://www.linuxquestions.org/questi...hreadid=336739
http://www.linuxquestions.org/questi...d.php?t=395751
One of the posters goes so far as to say that it is impossible to upgrade to perl 5.8.6 on Mandrake 10.1. It would appear that simply installing the newest Mandriva is the only way to get the latest perl.
On the other hand, my original problem was getting MySQL to work. So what I did instead was to download the RPMs from the MySQL page:
http://dev.mysql.com/downloads/
And install them:
The installation looks like it worked. I can get into MySQL from the command line without problem. However when I run a simple php script trying to use MySQL, I get:Code:# urpmi MySQL-server-4.0.20-0.i386.rpm # urpmi MySQL-client-4.0.20-0.i386.rpm
This is a fairly generic error. I found some good advice here:Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test/index.php on line 19
http://www.somacon.com/p109.php
However despite trying many of the things suggested, I still can't get it to work. I'm using "Mandrakelinux release 10.1 (Official) for i586", and in the file "/etc/php.ini" it points out some ways in which Mandrake uses PHP differently. Despite accounting for those differences, I can't get it to work.
When I open the MySQL portion of webmin I see a warning:
Sounds like good advice. Of course, when I try to install these packages, I get:Warning, the following package(s) are missing from your system for reliable access to your MySQL database: perl-DBI perl-Mysql. To install them, you may use the graphical program rpmdrake or the commandline program urpmi. Then, re-load this page.
Which is the same problem as before! I can't install perl 5.8.6, or the system will break. I could try to find an older version of "perl-DBD-mysql" (that works with perl 5.8.5), but then would it work with the versions of everything else I have installed?Code:# urpmi perl-DBI Everything already installed # urpmi perl-Mysql To satisfy dependencies, the following 3 packages are going to be installed (20 MB): perl-5.8.6-6.2.102mdk.i586 perl-DBD-mysql-2.9004-6mdk.i586 perl-base-5.8.6-6.2.102mdk.i586 Is this OK? (Y/n) n
Essentially, my problem as it now stands is that PHP works, MySQL works, but they cannot interface properly... and I can't find a combination of MySQL and associated libraries versions that doesn't require perl 5.8.6. If anyone has any ideas about how to upgrade to perl 5.8.6 (on Mandrake 10.1) and/or how to get my current install of MySQL working (MySQL 4.0.20) without upgrading perl, let me know!
Thanks!
- 01-19-2006 #3Just Joined!
- Join Date
- Oct 2005
- Posts
- 5
Got MySQL working; perl not possible
Update:
For anyone who reads this thread later, here is the solution that worked for me. It is a partial solution: I was not able to upgrade perl, but I did manage to get MySQL working properly. In fact, from the checking I've done, it appears impossible to upgrade perl on Mandrake 10.1. This problem apparently doesn't exist in newer versions of Mandriva, so a full upgrade or install of a new version would fix it.
To get MySQL to work, here's what I did: I realized that the version of MySQL that shipped with my Mandrake installation (10.1 Official) should be compatible with the installed version of perl (5.8.5). The install CDs can be found here:
http://www.linuxiso.org/distro.php?distro=29
First I uinstalled all the various MySQL bits that I had lying around:
The Mandrake 10.1 CD #2 has MySQL (and associated libraries), so I installed them:Code:# urpme MySQL-server-4.0.20-0.i386.rpm # urpme MySQL-client-4.0.20-0.i386.rpm
You could use the "--excludemedia main,contrib,update" switch to force it to use the specified rpm, without checking the online repositories. Alternately, if you have your installation CDs defined, you should be able to do "urpmi MySQL-4.0.20-3mdk.i586.rpm --media CD1,CD2,CD3" (or similar) and it will get the proper dependencies. Just make sure it doesn't try to update perl!Code:# cd /mnt/cdrom/media/main2/ # urpmi php-mysql-4.3.8-1mdk.i586 # urpmi libmysql12-4.0.20-3mdk.i586.rpm # urpmi MySQL-client-4.0.20-3mdk.i586.rpm # urpmi perl-Data-ShowTable-3.3-9mdk.noarch.rpm # urpmi perl-Mysql-1.22_19-9mdk.i586.rpm # urpmi MySQL-common-4.0.20-3mdk.i586.rpm # urpmi MySQL-4.0.20-3mdk.i586.rpm
Some notes: the above order should be correct to satisfy dependencies. Also, make sure the versions match up and work. At first this install didn't work beacause I still had an old package from my previous unsuccessful attempts at getting MySQL to work (specifically I had php-mysql-4.3.10-7mdk.i586 when I actually needed php-mysql-4.3.8-1mdk.i586).
Then you can do the usual MySQL configuration stuff. For more info:
http://www.yolinux.com/TUTORIALS/Lin...rialMySQL.html
So I initialized the install:
And set a root password:Code:# /usr/bin/mysql_install # /usr/bin/mysql_install_db
And started the daemon:Code:$ /usr/bin/mysqladmin -u root password 'new-password' $ /usr/bin/mysqladmin -u root -h barrett6 password 'new-password'
Code:# /usr/bin/mysqld_safe &
Some excellent advice for making sure PHP is configured to talk to MySQL can be found here:
http://www.somacon.com/p109.php
For instance, to the file /etc/php.ini I uncommented/modified the lines:
Code:extension=mysql.so extension_dir = /usr/lib/php/extensions mysql.default_socket = /var/lib/mysql/mysql.sock
And to get it to PHP to notice the changes, you restart apache:
Code:# service httpd restart
The above worked for me. I now have a functioning PHP/MySQL system. I will just have to live without the latest perl.


Reply With Quote
