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

Greetings Monks,

This is my first post so forgive me if I leave out any crucial information.

System: ubuntu 16.04
Perl version: 5.22.1
CPAN.pm version: 2.11, script version 1.63

I am attempting to install the program 'Variant Effect Predictor' from the website:
http://uswest.ensembl.org/info/docs/tools/vep/script/index.html

The documentation for the program has me unzip the download file, change directory to ~/ensembl-tools-release-84/scripts/variant_effect_predictor and then run the install file, <perl INSTALL.pl>

When I run the program, this is the output/error message:

$ sudo perl INSTALL.pl
sudo password for cookersjs:
Hello! This installer is configured to install v84 of the Ensembl API for use by the VEP. It will not affect any existing installations of theEnsembl API that you may have.
It will also download and install cache files from
Ensembl's FTP server.

Checking for installed versions of the Ensembl API...done
Setting up directories
Destination directory ./Bio already exists.
Do you want to overwrite it (if updating VEP this is
probably OK) (y/n)? y
- fetching BioPerl
** GET https://github.com/bioperl/bioperl-live/archive/release-1-6-924.zip ==> 302 Found
** GET https://codeload.github.com/bioperl/bioperl-live/zip/release-1-6-924 ==>200 OK (2s)
- unpacking ./Bio/tmp/release-1-6-924.zip
format error: can't find EOCD signature
at /usr/share/perl5/Archive/Zip/Archive.pm line 718.

Archive::Zip::Archive::_findEndOfCentralDirectory(Archive::Zip::Archive=HASH(0x242c770), IO::File=GLOB(0x2817dc8))
called at /usr/share/perl5/Archive/Zip/Archive.pm line 591
Archive::Zip::Archive::readFromFileHandle(Archive::Zip::Archive=HASH(0x242c770), IO::File=GLOB(0x2817dc8), "/home/justin/ensembl-tools-release-84/scripts/variant_effect_"...)
called at /usr/share/perl5/Archive/Zip/Archive.pm line 559
Archive::Zip::Archive::read(Archive::Zip::Archive=HASH(0x242c770), "/home/justin/ensembl-tools-release-84/scripts/variant_effect_"...) called at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 1160
Archive::Extract::_unzip_az(Archive::Extract=HASH(0x14971d0)) called at /usr/local/share/perl/5.22.1/Archive/Extract.pm line 438
Archive::Extract::extract(Archive::Extract=HASH(0x14971d0), "to", "./Bio/tmp/") called at INSTALL.pl line 1525
main::unpack_arch("./Bio/tmp/release-1-6-924.zip", "./Bio/tmp/") called at INSTALL.pl line 638
main::bioperl() called at INSTALL.pl line 245
main::api() called at INSTALL.pl line 220
Unable to read '/home/justin/ensembl-tools-release-84/scripts/variant_effect_predictor/Bio/tmp/release-1-6-924.zip' at INSTALL.pl line 1525.
No '/bin/unzip' program found at INSTALL.pl line 1525.
Extract failed due to errors at INSTALL.pl line 1525.
Unable to read '/home/justin/ensembl-tools-release-84/scripts/variant_effect_predictor/Bio/tmp/release-1-6-924.zip'
No '/bin/unzip' program found
Extract failed due to errors at INSTALL.pl line 1525.


-The problem lies in the unzipping of the file created in ./Bio/tmp/ called 'release-1-6-924.zip'

-When I go into the directory and try <unzip release-1-6-924.zip>, the message I get is:
Archive: release-1-6-924.zip
End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of release-1-6-924.zip or release-1-6-924.zip.zip, and cannot find release-1-6-924.zip.ZIP, period.

- I think it may be the wrong type of .zip file

- Interestingly, if I follow the link:
https://codeload.github.com/bioperl/bioperl-live/zip/release-1-6-924,
found near the beginning of the error message, I am able to download an unzippable version of this file through my browser.

-The file is named differently though:
'bioperl-live-release-1-6-924.zip',
but unzip command works

-Any suggestions or insight are greatly appreciated!
  • Comment on Installation error; INSTALL.pl program is unable to unzip downloaded file

Replies are listed 'Best First'.
Re: Installation error; INSTALL.pl program is unable to unzip downloaded file
by haukex (Archbishop) on Nov 03, 2016 at 19:30 UTC

    Hi cookersjs,

    I seem to be unable to reproduce this; downloading the file from the URL https://github.com/bioperl/bioperl-live/archive/release-1-6-924.zip, even when I use LWP::Simple in the same way that INSTALL.pl does, I get a file that unzips without errors. Perhaps it was just a temporary error, and you could try downloading the file again. You might also try looking at what the file you downloaded actually contains, for example with hexdump -C file.zip | head -50. Or, perhaps you could try upgrading your LWP::Simple, LWP::Protocol::https and Archive::Zip.

    Hope this helps,
    -- Hauke D

      Thanks for the reply Hauke D.

      I have tried a lot of different things, including your suggestions but to no avail. Given that I know I can download an unzippable file from my browser, I am just going to enter the INSTALL.pl file and try to create my own work around. Its not a terribly large file so I dont think it will be to bad.


      Thanks again
      -cookersjs
        Hi cookersjs. I get the same error log with you. But the reason I faild is the server I work on is network-unavailable. So curl can not download the "release-1-6-924.zip" file(the log is : curl: (6) Couldn't resolve host 'github.com'). Ok! I download the file manually. then run "perl INSTALL.pl", when it goes to :
        Setting up directories Destination directory ./Bio already exists. Do you want to overwrite it (if updating VEP this is probably OK) (y/n +)?
        if I type n, it will exit:
        Setting up directories Destination directory ./Bio already exists. Do you want to overwrite it (if updating VEP this is probably OK) (y/n +)? n Exiting
        but if I type y, the zip file I download and copy to ./Bio disappear because it will overwrite the ./Bio directory.

        I am crazy by this. Could you tell me how to fix this problem? Thanks in advance!

Re: Installation error; INSTALL.pl program is unable to unzip downloaded file
by cookersjs (Acolyte) on Nov 08, 2016 at 19:59 UTC
    As a follow-up to this problem for anyone this may happen to in the future (hopefully not!):
    My solution was to change line 54 in the INSTALL.pl file:
     our $use_curl = 0; to  our $use_curl = 1;

    This let the program download the appropriate files using an alternate method rather then the default one. I believe that the underlying problem to this code was related to the LWP::Simple module, as suggested by Hauke D. I tried everything under the sun to fix this code but in the end, it was really just changing a 0 to 1