Question
I'm getting the following error when trying to install plugins. The host is Dreamhost...it is a shared server. Has anyone experienced this? Thank You
Warning: I can't install http://twiki.org/p/pub/Plugins/CalendarPlugin/CalendarPlugin.tgz because I don't recognise the download as a gzip file.
Warning: Extension may not have been packaged correctly. Trying for a .zip file instead.
Fetching http://twiki.org/p/pub/Plugins/CalendarPlugin/CalendarPlugin.zip...
Unpacking...
CalendarPlugin_installer.pl
data/
data/TWiki/
data/TWiki/CalendarPlugin.txt
lib/
lib/TWiki/
lib/TWiki/Plugins/
lib/TWiki/Plugins/CalendarPlugin.pm
pub/
pub/TWiki/
pub/TWiki/CalendarPlugin/
pub/TWiki/CalendarPlugin/exclam.gif
Error: Failed to move file 'pub/TWiki/CalendarPlugin/' to /home/bluespirit/beckstromwiki.com/twiki/pub/TWiki/CalendarPlugin/: Is a directory
Software error:
Installation terminated at /home/bluespirit/beckstromwiki.com/twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 149.
Environment
--
SteveSoskin - 10 Mar 2007
Answer
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.
I had a look at
EXTEND.pm but I can't see where the bug is. However, the bug is quite interesting -
CPAN:File::Copy
is used to do the file move, which attempts first to do a Perl
rename call (line 441 of File::Copy v2.08 on my Linux box), which may well be failing because on Dreamhost (as on some Linux boxes but not all), the
/tmp file location for the unzipped files is on a different filesystem to your home directory.
So... I think a possible fix is for EXTEND.pm to tell File::Copy to use temp files under the TWiki home directory, which will work in some but not all cases, or preferably to do Copy and Unlink, which should always work. I suggest you file a bug about this on
Bugs:WebHome
, pointing to
TWiki:Support.InstallingPluginsDreamhosterrors
.
It is probably easier to just install this plugin manually, but the .tgz file appears to be corrupt so use the ZIP, but please comment re the TGZ file on the plugin's Dev page as well.
To install from ZIP:
- Download the .zip file while cd'ed to your home dir, using =wget http://twiki.org/p/pub/Plugins/CalendarPlugin/CalendarPlugin.zip=
from command line
- Assuming your TWiki site is completely under your domain dir, /home/bluespirit/beckstromwiki.com/twiki, cd to that directory and then run
unzip ~/CalendarPlugin.zip - you can use unzip -l on this file to check its contents beforehand though
- Check the permissions are correct - see the plugin and TWiki install docs - generally I would do chmod 644 on all files, 755 on all dirs, and 666 on the .txt file. Dreamhost's setup is quite safe in that the home directory is not accessible to any other users, whether using shell or CGI, so this should be fine. (See DreamhostSetupNotes for some other tips.)
You may need to remove any half-installed files, but try the above first as it may just work. See
Plugins for more docs on installing plugins.
--
RichardDonkin - 10 Mar 2007
Thanks for the reply, Richard. This is happening with all of the plugins I'm trying, such as
NatSkin.
--
SteveSoskin - 10 Mar 2007
Now logged as a TWiki bug at
Bugs:Item3748
, please check there for any fix.
I suspect the basic problem is that EXTEND.pm is missing the code in
CPAN:File::Copy::Recursive
that effectively moves directories between filesystems (by deleting and recreating them). So EXTEND.pm works fine on a single filesystem hosting both
/tmp and the TWiki directories, but not across filesystems.
--
RichardDonkin - 11 Mar 2007
Actually it's simpler than that; File::Copy is pretty stupid, and needs some help. It's fixed in subversion, but if anyone is interested in back-porting to the released code, then see subversion checking #13529
--
CrawfordCurrie - 26 Apr 2007
Patch:
Modified: twiki/branches/MAIN/lib/TWiki/Configure/UIs/EXTEND.pm
===================================================================
--- twiki/branches/MAIN/lib/TWiki/Configure/UIs/EXTEND.pm 2007-04-25 17:03:20 UTC (rev 13528)
+++ twiki/branches/MAIN/lib/TWiki/Configure/UIs/EXTEND.pm 2007-04-26 06:07:23 UTC (rev 13529)
@@ -144,7 +144,13 @@
print $this->ERROR("No permission to write to $ef");
die "Installation terminated";
} elsif (!-d $ef) {
- unless (File::Copy::move("$dir/$file", $ef)) {
+ if (-d "$dir/$file") {
+ unless (mkdir($ef)) {
+ print $this->ERROR(
+ "Cannot create directory $ef: $!");
+ die "Installation terminated";
+ }
+ } elsif (!File::Copy::move("$dir/$file", $ef)) {
print $this->ERROR("Failed to move file '$file' to $ef: $!");
die "Installation terminated";
};
@@ -236,6 +242,7 @@
push(@names, "$path$f");
}
}
+ closedir($d);
}
return @names;
}
--
PeterThoeny - 26 Apr 2007
Many thanks for this fix. I was able to apply it with no problem on my installation.
--
TWikiGuest - 09 Aug 2007
Your welcome. (Please register with your real name (see the notes in the
TWikiRegistration page))
--
PeterThoeny - 10 Aug 2007
Shouldn't this fix be listed on
http://twiki.org/cgi-bin/view/Codev/KnownIssuesOfTWiki04x01#ReleaseTWiki_4_1_2
?
--
MartinCleaver - 06 Oct 2007
Also, this patched badly for me (4.1.2) File to patch:
lib/TWiki/Configure/UIs/EXTEND.pm
patching file lib/TWiki/Configure/UIs/EXTEND.pm
Hunk #2 succeeded at 307 with fuzz 1 (offset 65 lines).
For me that fuzziness offset causes the error Global symbol "$d" requires explicit package name at lib/TWiki/Configure/UIs/EXTEND.pm line 310, line 1.
-- Main.MartinCleaver - 06 Oct 2007
This fix work for my Diskstation DS106j (NAS with BusyBox where /tmp is a RAM based filesystem and /twiki is in a separate filesystem)
Many thanks!
-- Main.ThomasHesse - 10 Oct 2007