Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Ubuntu cups package upgrade problem after upgrading to Perl 5.10

by jkeenan1 (Deacon)
on Jan 14, 2008 at 16:14 UTC ( [id://662305]=perlquestion: print w/replies, xml ) Need Help??

jkeenan1 has asked for the wisdom of the Perl Monks concerning the following question:

On an Ubuntu box I previously used Perl 5.8.8, compiled from source with no special options. Recently I upgraded to Perl 5.10.0, again compiled from source with no special options. Since that upgrade most of the problems I have encountered have related to modules with XS code. What follows may be similar.

I was prompted by Synaptic Package Manager to upgrade the CUPS printing system today. Two of the three packages upgraded successfully but 'cupsys-client' failed. Here's the output I got when I tried a second time via apt-get:

[~] 512 $ sudo apt-get install cupsys-client Reading package lists... Done Building dependency tree... Done cupsys-client is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 0B of archives. After unpacking 0B of additional disk space will be used. Setting up cupsys (1.2.2-0ubuntu0.6.06.6) ... Can't load '/usr/local/lib/perl5/site_perl/5.8.8/i686-linux//auto/Unic +ode/String/String.so' for module Unicode::String: /usr/local/lib/perl +5/site_perl/5.8.8/i686-linux//auto/Unicode/String/String.so: undefine +d symbol: PL_dowarn at /usr/lib/perl/5.8/DynaLoader.pm line 225. at /usr/sbin/install-docs line 25 Compilation failed in require at /usr/sbin/install-docs line 25. BEGIN failed--compilation aborted at /usr/sbin/install-docs line 25. dpkg: error processing cupsys (--configure): subprocess post-installation script returned error exit status 2 Errors were encountered while processing: cupsys E: Sub-process /usr/bin/dpkg returned an error code (1)

Result: I currently am unable to print any documents.

Suggestions? Thanks in advance.

Jim Keenan

Replies are listed 'Best First'.
Re: Ubuntu cups package upgrade problem after upgrading to Perl 5.10
by Corion (Patriarch) on Jan 14, 2008 at 16:17 UTC
    Recently I upgraded to Perl 5.10.0

    Do never, ever upgrade or change the Perl in /usr/bin. It belongs to your system and is sacred to your system. Always install your own compiled Perls somewhere else.

    I guess a possible fix is to force/trick Ubuntu into (re)installing its own system Perl over your hodgepodge of Perl versions.

      This put a bandaid on the problem and enabled me to get CUPS working again.

      $ sudo env -u PERL5LIB apt-get install cupsys-client Reading package lists... Done Building dependency tree... Done cupsys-client is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 0B of archives. After unpacking 0B of additional disk space will be used. Setting up cupsys (1.2.2-0ubuntu0.6.06.6) ... * Starting Common Unix Printing System: cupsd + [ ok ]

      Jim Keenan
      Corion wrote:

      Do never, ever upgrade or change the Perl in /usr/bin. It belongs to your system and is sacred to your system. Always install your own compiled Perls somewhere else.

      Not guilty. Both of my compiled perls were installed in /usr/local/bin/.

      However, I realize now that my upgrade to 5.8.8 was superfluous in the sense that the system perl at the time of that upgrade already was 5.8.8. Here are the respective perl -Vs.

      $ /usr/bin/perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.15.7, archname=i486-linux-gnu-thread-mult +i uname='linux rothera 2.6.15.7 #1 smp tue jun 27 18:34:43 utc 2006 +i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dccc +dlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr -Dprivlib=/usr/ +share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvend +orlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/ +local -Dsitelib=/usr/local/share/perl/5.8.8 -Dsitearch=/usr/local/lib +/perl/5.8.8 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/ma +n3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man +3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs - +Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_ +dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemulti +plicity=define useperlio=define d_sfio=undef uselargefiles=define +usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS +-DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE +_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN +-fno-strict-aliasing -pipe -I/usr/local/include' ccversion='', gccversion='4.1.2 20060613 (prerelease) (Ubuntu 4.1. +1-2ubuntu5)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.4.so, so=so, useshrplib=true, libperl=libperl.so. +5.8.8 gnulibc_version='2.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREAD +S USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Jul 7 2006 18:08:25 %ENV: PERL5LIB="/home/jimk/lib/perl:/usr/local/lib/perl5/site_perl/5.8.8 +/i686-linux/" @INC: /home/jimk/lib/perl /usr/local/lib/perl5/site_perl/5.8.8/i686-linux/ /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .

      $ /usr/local/bin/perl5.8.8 -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.12-9-386, archname=i686-linux uname='linux ubuntu 2.6.12-9-386 #1 mon oct 10 13:14:36 bst 2005 i +686 gnulinux ' config_args='-de -Dprefix=/usr/local -Doptimize=-O3 + -march=i686 -mtune=pentium4 -pipe' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultipl +icity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after- +statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BIT +S=64', optimize='-O3 -march=i686 -mtune=pentium4 -pipe', cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement + -I/usr/local/include' ccversion='', gccversion='4.0.2 20050808 (prerelease) (Ubuntu 4.0. +1-4ubuntu9)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lcrypt -lutil -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc libc=/lib/libc-2.3.5.so, so=so, useshrplib=false, libperl=libperl. +a gnulibc_version='2.3.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP USE_LARGE_FILES USE_PERLIO Built under linux Compiled at Sep 13 2006 16:24:23 %ENV: PERL5LIB="/home/jimk/lib/perl:/usr/local/lib/perl5/site_perl/5.8.8 +/i686-linux/" @INC: /home/jimk/lib/perl /usr/local/lib/perl5/site_perl/5.8.8/i686-linux/ /usr/local/lib/perl5/5.8.8/i686-linux /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i686-linux /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .

      Could that be the source of the problem?

      Jim Keenan
        PERL5LIB="/home/jimk/lib/perl:/usr/local/lib/perl5/site_perl/5.8.8/i686-linux/"

        Try the following: PERL5LIB="" apt-get install $whatever

        Things like left over environment variables are a good reason for a separate root account (that some distributions don't provide anymore).

      One further twist: Synaptic describes perl 5.8.8-6 as the installed version and the latest version for packages perl, perl-base and perl-modules -- but also does not described them as "supported packages."

      Jim Keenan
Re: Ubuntu cups package upgrade problem after upgrading to Perl 5.10
by jkeenan1 (Deacon) on Jan 16, 2008 at 15:00 UTC
    The ultimate source of the problem was that when I was building 5.10, I called Configure -- as I have always done -- with -de to accept all defaults and skip all prompts. Well, there's one prompt for the directory for architecture-specific libraries whose default value was:

    /usr/local/lib/perl5/site_perl/5.8.8/i686-linux/

    ... which was the directory that Synaptic and apt-get were complaining about.

    So the fix was to: (a) clear out all PERL5LIB settings from by .bashrc file, log out and back in; (b) rebuild Perl 5.10, starting with Configure and responding to prompts manually -- including one at which I said do not use a previously used Perl 5 configuration settings file.

    The end result was a purer Perl 5.10. Today Synaptic prompted me to upgrade the cupsys server program. This failed the first time through (which was before I had reinstalled 5.10) for the same reason as cupsys-client did the other day. But after the reconfiguration and rebuild, apt-get was apparently satisfied, because cupsys upgraded without a hitch.

    Jim Keenan

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://662305]
Approved by kyle
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-29 12:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found