Tags:
create new tag
view all tags

SID-02097: Trouble "upgrading" LdapContrib after installing CPAN deps

Status: Unanswered Unanswered TWiki version: Perl version: 5.10.1
Category: LdapContrib Server OS: CentOs 6.7 Last update: 10 years ago

I'm getting Net/LDAP errors when trying to "upgrade my LDAPContrib" plugin. The odd thing is my installed package is 0.65 but the error is for >=0.33.

Can I uninstall LdabContrib and reinstall now that I have CPAN in place? If so how do I do a clean uninstall/re-install?

### LdapContrib Installer ###

This installer must be run from the root directory of your TWiki
installation.
    * You can abort the script at any point and re-run it later
    * If you answer 'no' to any questions you can always re-run
      the script again later
##########################################################
Checking dependency on Authen::SASL....
##########################################################
Checking dependency on DB_File::Lock....
##########################################################
Checking dependency on DB_File....
##########################################################
Checking dependency on Digest::MD5....
##########################################################
Checking dependency on Net::LDAP....
*** LdapContrib depends on cpan package Net::LDAP >=0.33

which is described as "Required" But when I tried to find it I got this error:

Attempt to reload Net/LDAP.pm aborted.
Compilation failed

This module is available from the CPAN archive (http://www.cpan.org). You
can download and install it from here. The module will be installed
to wherever you configured CPAN to install to.

Error: Installer returned errors:
mkdir /root/.cpan: Permission denied at /usr/local/share/perl5/CPAN/FTP.pm line 520
 at /usr/share/perl5/File/Path.pm line 156
   File::Path::_mkpath('HASH(0x3757c30)', 'ARRAY(0x3745878)') called at /usr/share/perl5/File/Path.pm line 133
   File::Path::_mkpath('HASH(0x3757c30)', 'ARRAY(0x3745b48)') called at /usr/share/perl5/File/Path.pm line 133
   File::Path::_mkpath('HASH(0x3757c30)', 'ARRAY(0x3759de8)') called at /usr/share/perl5/File/Path.pm line 114
   File::Path::mkpath('/root/.cpan/sources/authors') called at /usr/local/share/perl5/CPAN/FTP.pm line 520
   CPAN::FTP::mymkpath('CPAN::FTP', '/root/.cpan/sources/authors') called at /usr/local/share/perl5/CPAN/FTP.pm line 415
   CPAN::FTP::localize('CPAN::FTP', 'authors/01mailrc.txt.gz', '/root/.cpan/sources/authors/01mailrc.txt.gz', 3) called at /usr/local/share/perl5/CPAN/Index.pm line 226
   CPAN::Index::reload_x('CPAN::Index', 'authors/01mailrc.txt.gz', 'authors/01mailrc.txt.gz', undef) called at /usr/local/share/perl5/CPAN/Index.pm line 84
   CPAN::Index::reload('CPAN::Index') called at /usr/local/share/perl5/CPAN.pm line 979
   CPAN::exists('CPAN=HASH(0x36a7bb8)', 'CPAN::Module', 'Net::LDAP') called at /usr/local/share/perl5/CPAN/Shell.pm line 1404
   CPAN::Shell::expand_by_method('CPAN::Shell', 'CPAN::Module', 'ARRAY(0x21e44e8)', 'Net::LDAP') called at /usr/local/share/perl5/CPAN/Shell.pm line 1321
   CPAN::Shell::expand('CPAN::Shell', 'Module', 'Net::LDAP') called at tools/extender.pl line 261
   TWiki::Extender::satisfy('HASH(0x36d69d8)') called at tools/extender.pl line 924
   TWiki::Extender::_install('ARRAY(0x36d4ce0)', 'LdapContrib') called at tools/extender.pl line 1057
   TWiki::Extender::install('http://twiki.org/p/pub/Plugins', 'LdapContrib', 'LdapContrib', 'MANIFEST', 'data/TWiki/LdapContrib.txt,0644,Documentation topic.\x{a}lib/TWik...', 'DEPENDENCIES', 'Authen::SASL,>=2.00,1,cpan,Optional\x{a}DB_File::Lock,>=0.05,1,cp...') called at /var/www/twiki/LdapContrib_installer line 105
   require /var/www/twiki/LdapContrib_installer called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 177
   eval {...} called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 175
   TWiki::Configure::UIs::EXTEND::ui('TWiki::Configure::UIs::EXTEND=HASH(0x18ba048)') called at /var/www/twiki/bin/configure line 708
   TWiki::_actionInstallExtension() called at /var/www/twiki/bin/configure line 478
 at /usr/share/perl5/CGI/Carp.pm line 379
   CGI::Carp::realdie('mkdir /root/.cpan: Permission denied at /usr/local/share/perl...') called at /usr/share/perl5/CGI/Carp.pm line 468
   CGI::Carp::die('mkdir /root/.cpan: Permission denied at /usr/local/share/perl...') called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 179
   eval {...} called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 175
   TWiki::Configure::UIs::EXTEND::ui('TWiki::Configure::UIs::EXTEND=HASH(0x18ba048)') called at /var/www/twiki/bin/configure line 708
   TWiki::_actionInstallExtension() called at /var/www/twiki/bin/configure line 478

-- Ian Walker - 2015-08-17

Discussion and Answer

When I install TWiki extensions I always install the dependent libraries first as root user. That way the TWiki installer does not try to install them as the apache user.

To uninstall an extension, delete the relevant files. The LdapContrib files are listed at SVN:LdapContrib/lib/TWiki/Contrib/LdapContrib/MANIFEST. However, there is no need to uninstall the extension when you upgrade. The upgrade will preserve the old files as .bak files, and will replace them.

-- Peter Thoeny - 2015-08-22

This is my latest error. It is on the Centos VM. Yum shows perl-LDAP to be installed already. Unclear why I would be getting error.

### LdapContrib Installer ###

This installer must be run from the root directory of your TWiki
installation.
    * You can abort the script at any point and re-run it later
    * If you answer 'no' to any questions you can always re-run
      the script again later
##########################################################
Checking dependency on Authen::SASL....
##########################################################
Checking dependency on DB_File::Lock....
##########################################################
Checking dependency on DB_File....
##########################################################
Checking dependency on Digest::MD5....
##########################################################
Checking dependency on Net::LDAP....
*** LdapContrib depends on cpan package Net::LDAP >=0.33

which is described as "Required" But when I tried to find it I got this error:

Attempt to reload Net/LDAP.pm aborted.
Compilation failed

This module is available from the CPAN archive (http://www.cpan.org). You
can download and install it from here. The module will be installed
to wherever you configured CPAN to install to.

Error: Installer returned errors:
mkdir /root/.cpan: Permission denied at /usr/local/share/perl5/CPAN/FTP.pm line 520
 at /usr/share/perl5/File/Path.pm line 156
   File::Path::_mkpath('HASH(0x3e0fc20)', 'ARRAY(0x3dfd868)') called at /usr/share/perl5/File/Path.pm line 133
   File::Path::_mkpath('HASH(0x3e0fc20)', 'ARRAY(0x3dfdb38)') called at /usr/share/perl5/File/Path.pm line 133
   File::Path::_mkpath('HASH(0x3e0fc20)', 'ARRAY(0x3e11dd8)') called at /usr/share/perl5/File/Path.pm line 114
   File::Path::mkpath('/root/.cpan/sources/authors') called at /usr/local/share/perl5/CPAN/FTP.pm line 520
   CPAN::FTP::mymkpath('CPAN::FTP', '/root/.cpan/sources/authors') called at /usr/local/share/perl5/CPAN/FTP.pm line 415
   CPAN::FTP::localize('CPAN::FTP', 'authors/01mailrc.txt.gz', '/root/.cpan/sources/authors/01mailrc.txt.gz', 3) called at /usr/local/share/perl5/CPAN/Index.pm line 226
   CPAN::Index::reload_x('CPAN::Index', 'authors/01mailrc.txt.gz', 'authors/01mailrc.txt.gz', undef) called at /usr/local/share/perl5/CPAN/Index.pm line 84
   CPAN::Index::reload('CPAN::Index') called at /usr/local/share/perl5/CPAN.pm line 979
   CPAN::exists('CPAN=HASH(0x3d5fba8)', 'CPAN::Module', 'Net::LDAP') called at /usr/local/share/perl5/CPAN/Shell.pm line 1404
   CPAN::Shell::expand_by_method('CPAN::Shell', 'CPAN::Module', 'ARRAY(0x289c518)', 'Net::LDAP') called at /usr/local/share/perl5/CPAN/Shell.pm line 1321
   CPAN::Shell::expand('CPAN::Shell', 'Module', 'Net::LDAP') called at tools/extender.pl line 261
   TWiki::Extender::satisfy('HASH(0x3d8e9c8)') called at tools/extender.pl line 924
   TWiki::Extender::_install('ARRAY(0x3d8ccd0)', 'LdapContrib') called at tools/extender.pl line 1057
   TWiki::Extender::install('http://twiki.org/p/pub/Plugins', 'LdapContrib', 'LdapContrib', 'MANIFEST', 'data/TWiki/LdapContrib.txt,0644,Documentation topic.\x{a}lib/TWik...', 'DEPENDENCIES', 'Authen::SASL,>=2.00,1,cpan,Optional\x{a}DB_File::Lock,>=0.05,1,cp...') called at /var/www/twiki/LdapContrib_installer line 105
   require /var/www/twiki/LdapContrib_installer called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 177
   eval {...} called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 175
   TWiki::Configure::UIs::EXTEND::ui('TWiki::Configure::UIs::EXTEND=HASH(0x1f72048)') called at /var/www/twiki/bin/configure line 708
   TWiki::_actionInstallExtension() called at /var/www/twiki/bin/configure line 478
 at /usr/share/perl5/CGI/Carp.pm line 379
   CGI::Carp::realdie('mkdir /root/.cpan: Permission denied at /usr/local/share/perl...') called at /usr/share/perl5/CGI/Carp.pm line 468
   CGI::Carp::die('mkdir /root/.cpan: Permission denied at /usr/local/share/perl...') called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 179
   eval {...} called at /var/www/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 175
   TWiki::Configure::UIs::EXTEND::ui('TWiki::Configure::UIs::EXTEND=HASH(0x1f72048)') called at /var/www/twiki/bin/configure line 708
   TWiki::_actionInstallExtension() called at /var/www/twiki/bin/configure line 478

-- Ian Walker - 2015-08-26

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- Peter Thoeny - 2015-10-06

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Unanswered
Title Trouble "upgrading" LdapContrib after installing CPAN deps
SupportCategory LdapContrib
TWiki version

Server OS CentOs 6.7
Web server Apache 2.2
Perl version 5.10.1
Browser & version Chrome on Windows V44.xx
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2015-10-06 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.