Question
While trying to enable the Rss feature, I receive the following error:
Software error:
Can't locate LWP/UserAgent.pm in @INC (@INC contains: ../lib . /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8) at (eval 62) line 2.
BEGIN failed--compilation aborted at (eval 62) line 2.
Environment
--
JasonVensel - 14 Feb 2006
Answer
You must install the LWP CPAN module for the RSS feature to work.
I received this error while trying to configure the RSS feature. For beginners who may not be aware, basic RSS configuration consists of three parts (yes, there are likely many different ways to do this, but these steps will allow beginners like me to get it up and running; after that they can play around with it as they see fit):
Basic RSS Configuration
First, configure the WebRss topic.
You have to configure the
!WebRss topic that exists in each web. Do this by inserting the following text in each Rss topic:
<channel rdf:about="%SCRIPTURL%/view%SCRIPTSUFFIX%/%INCLUDINGWEB%">
<title>%WIKITOOLNAME%'s %INCLUDINGWEB% web</title>
<link>%SCRIPTURL%/view%SCRIPTSUFFIX%/%INCLUDINGWEB%</link>
<description>(the description of the web). TWiki is a Web-Based Collaboration Platform for the Corporate World.</description>
%INCLUDE{"TWiki06x01.WebRssBase"}% <!--
* Set SKIN = rss
-->
Second, verify the HeadlinesPlugin is installed.
You must verify the
HeadlinesPlugin is installed. This is the RSS reader. You can verify this by viewing the list of installed plugins that exists in the
TWikiPreferences topic.
Third, add the HEADLINE variable and RSS URL to a topic.
You'll have to add the headline variable (and RSS URL) to the topic that you want to display the RSS output. You can do this in any topic you wish. The basic string for the RSS output is (just copy this into a topic):
=
HeadlinesPlugin ERROR: 501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)
=
If everything on your system is installed correctly, you should be able to view the RSS output. However, if you do not have the CPAN
LWP module installed, you will receive the error that I did (see the
Question section above). See below for an explanation on how to resolve this.
How I Resolved this Issue
Based on the above error, I ran a file search on the TWiki server for the
useragent.pm file. It wasn't on the C: drive. Next, I went to the twiki.org site and ran a search on all webs for that file. I only received one result: a
CpanContrib plugin. It appears to list CPAN modules. I looked through the list and found two in the list that appear to be related to my error:
- CPAN:LWP
- CPAN:LWP::UserAgent
Based on this, I determined that I needed to install these modules. I opened Cygwin and launched CPAN. From the CPAN prompt, I first ran
install LWP. This ran an installation and required me to answer some questions. I answered "yes" and "replace/update all" to each of the questions. The installation appeared to complete successfully. Next, from the same CPAN prompt, I ran
install LWP::UserAgent. Apparently installing LWP also installs
UserAgent as I immediately received a message stating "UserAgent is up to date." I exited CPAN (type
quit and press ENTER) and then exited Cygwin (type
exit and then press ENTER). Then I went to test the RSS feed. Ta dah! It worked. RSS feeds are now working on my system.
Note that
HeadlinesPlugin also lists another CPAN dependency, on the MD5 module.
You might encourage the plugin authors to document the plugin dependencies more clearly.
--
CrawfordCurrie - 14 Feb 2006