Tags:
create new tag
view all tags

SID-01591: CPAN is not available, but I have installed it

Status: Answered Answered TWiki version: 5.1.2 Perl version: 5.014002 (linux)
Category: CategoryAddOns Server OS: Linux 2.6.42-26-generic (x86_64-linux-gnu-thread-multi) Last update: 11 years ago

When trying to install an extension I'm getting the following error


Warning: CPAN is not available, some installer functions have been disabled

Error: Installer returned errors:

********************************************************** Could not load installer script from tools/extender.pl.

If this is a TWiki release prior to 4.2, please download the latest version of the script from:

http://twiki.org/cgi-bin/view/Codev/ExtenderScript

and place it in the 'tools' directory below your installation root (create the directory if necessary).

If this is TWiki 4.2 or later, the script is missing from your installation, or may be broken.


CPAN is installed as I;ve used it to install the required packages

In addtion, the apache error log reports the following; not sure if its related


[Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] Use of qw(...) as parentheses is deprecated at tools/extender.pl line 143 (#1), referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] (D deprecated) You have something like foreach $x qw(a b c) {...},, referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] using a qw(...) list literal where a parenthesised expression is, referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] expected. Historically the parser fooled itself into thinking that, referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] qw(...) literals were always enclosed in parentheses, and as a result, referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] you could sometimes omit parentheses around them. (You could never do, referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] the foreach qw(a b c) {...} that you might have expected, though.), referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] The parser no longer lies to itself in this way. Wrap the list literal, referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] in parentheses, like foreach $x (qw(a b c)) {...}., referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:22:08 2012] [error] [client 192.168.1.1] , referer: http://211.30.29.35:65112/twiki/bin/configure?action=InstallExtension;repository=TWiki.org;extension=BreadCrumbsPlugin [Wed Nov 28 11:23:01 2012] [error] [client 66.249.76.38] [Wed Nov 28 11:23:01 2012] oops: Use of uninitialized value $param in hash element at /var/www/twiki/lib/TWiki/Engine.pm line 184. [Wed Nov 28 11:23:01 2012] [error] [client 66.249.76.38] [Wed Nov 28 11:23:01 2012] oops: Use of uninitialized value $param in hash element at /var/www/twiki/lib/TWiki/Engine.pm line 188.


-- LeoList - 2012-11-28

Discussion and Answer

Just realised, that the plugin is available in config despite the errors

-- LeoList - 2012-11-28

Do you need more info in order to help

-- LeoList - 2012-11-29

Checked all required CPAN modules.

llist@ml:/var/www/twiki2/bin$ perl -e 'use CGI::Session; print $CGI::Session::VERSION."\n"' 4.48 llist@ml:/var/www/twiki2/bin$ perl -e 'use Error; print $Error::VERSION."\n"' 0.17019 llist@ml:/var/www/twiki2/bin$ perl -e 'use FreezeThaw; print $FreezeThaw::VERSION."\n"' 0.5001 llist@ml:/var/www/twiki2/bin$ perl -e 'use GD; print $GD::VERSION."\n"' 2.46 llist@ml:/var/www/twiki2/bin$ perl -e 'use HTML::Tree; print $HTML::Tree::VERSION."\n"' 5.03

Have also checked CGI and Perl modules; everything is installed apart from Apache::Htpasswd

-- LeoList - 2012-11-29

Not sure why you get this error on plugin install. The BreadCrumbsPlugin has no dependencies, so it should not ask for CPAN. Did you enable the plugin? Are all files of the package installed?

-- PeterThoeny - 2012-11-29

Breadcrums is only an example. I get the warning on all extensions that I try.

Could this be a permission problem. Read that the installer pulls in/updates modules via CPAN; doesn't it need root access to do this system wide. I don't have a private copy

-- LeoList - 2012-11-29

In SID-01593 I have seen that you have a permission issue with your TWiki installation. If you use the extension installer make sure that your /var/www/twiki directory and everything in it is owned by the webserver user. If you install manually you must have twiki/data, twiki/pub, twiki/working, twiki/lib/LocalSite.cfg owned by the webserver user.

-- PeterThoeny - 2012-11-30

Everything under /var/www is owned by apache (www-data). The reason why I asked about permissions was that the documentation indicates the use of cpan; but isn't root the only user that can do this unless its a local install? Maybe barking up the wrong tree

-- LeoList - 2012-12-03

One more thing.

When I run the extension scripts manually as root, everything seems to install correctly

-- LeoList - 2012-12-03

I have similar (somewhat) problem, I had CPAN install as the root in my server and my plugin installation through config wont work (TWiki could not find it, permission issue maybe). So, I uninstalled it and re-install as a regular admin user in the the server and things work smoothly.

-- MichaelSevero - 2012-12-03

I did not design the installer. I actually never understood the reason to install CPAN module dependencies via browser. Yes, for security it is better to install system libs as root. Someone should enhance the TWiki installer with this in mind.

-- PeterThoeny - 2012-12-04

In the meantime, maybe we should update the doc/help

-- LeoList - 2012-12-06

Just wanted to chime in a "me too" on this one. (RHEL Server 6.1)

Every extension that I try to install gives me the "CPAN is not available" error, so I've just gotten used to running the installer manually as root from my webdir. I do always have to change their sha-bang line to #!/usr/bin/perl to get them to run, though.

-- Aaron Loessberg-Zahl - 2013-03-14

I am closing this after > 30 days. Feel free to re-open.

-- Peter Thoeny - 2013-05-01

The bug related to this is Item6965. I have updated this bug with a fix.

-- David Allen - 2014-04-16

      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 Answered
Title CPAN is not available, but I have installed it
SupportCategory CategoryAddOns
TWiki version 5.1.2
Server OS Linux 2.6.42-26-generic (x86_64-linux-gnu-thread-multi)
Web server Apache/2.2.22 (Ubuntu)
Perl version 5.014002 (linux)
Browser & version Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:16.0) Gecko/20100
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2014-04-16 - DavidDAllen
 
  • 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.