Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just 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:
    Code:
    # cat /etc/mandrake-release
    Mandrakelinux release 10.1 (Official) for i586
    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 doing
    Code:
    # urpmi MySQL
    I'll get errors like:

    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.
    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:
    /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":
    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
    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.

    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.

  2. #2
    Just 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:
    Code:
    # urpmi MySQL-server-4.0.20-0.i386.rpm
    # urpmi MySQL-client-4.0.20-0.i386.rpm
    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:

    Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test/index.php on line 19
    This is a fairly generic error. I found some good advice here:
    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:
    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.
    Sounds like good advice. Of course, when I try to install these packages, I get:
    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
    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?

    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!

  3. #3
    Just 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:
    Code:
    # urpme MySQL-server-4.0.20-0.i386.rpm
    # urpme MySQL-client-4.0.20-0.i386.rpm
    The Mandrake 10.1 CD #2 has MySQL (and associated libraries), so I installed them:
    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
    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!

    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:
    Code:
    # /usr/bin/mysql_install
    # /usr/bin/mysql_install_db
    And set a root password:
    Code:
    $ /usr/bin/mysqladmin -u root password 'new-password'
    $ /usr/bin/mysqladmin -u root -h barrett6 password 'new-password'
    And started the daemon:
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •