Question: efetch error LWP::Protocol::https not installed
1
gravatar for traviata
21 months ago by
traviata10
traviata10 wrote:

I'm trying to use fetch to download a sequence. However, I keep on getting 501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed) even though I have ran sudo cpan install LWP::Protocol::https

The terminal output is as follows:

$ efetch -db nuccore -id AF086833 -format fasta
501 Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)
No do_post output returned from 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&id=AF086833&rettype=fasta&retmode=text&edirect=7.00&tool=edirect&email=kjsdhjasv@MacBook-Air.local'
Result of do_post http request is
$VAR1 = bless( {
                 '_rc' => 501,
                 '_content' => 'LWP will support https URLs if the LWP::Protocol::https module
is installed.
',
                 '_msg' => 'Protocol scheme \'https\' is not supported (LWP::Protocol::https not installed)',
                 '_request' => bless( {
                                        '_method' => 'POST',
                                        '_content' => 'db=nuccore&id=AF086833&rettype=fasta&retmode=text&edirect=7.00&tool=edirect&email=kjsdhjasv@MacBook-Air.local',
                                        '_uri' => bless( do{\(my $o = 'https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi')}, 'URI::https' ),
                                        '_headers' => bless( {
                                                               'content-type' => 'application/x-www-form-urlencoded',
                                                               'user-agent' => 'libwww-perl/6.26'
                                                             }, 'HTTP::Headers' )
                                      }, 'HTTP::Request' ),
                 '_headers' => bless( {
                                        'client-warning' => 'Internal response',
                                        'content-type' => 'text/plain',
                                        '::std_case' => {
                                                          'client-warning' => 'Client-Warning',
                                                          'client-date' => 'Client-Date'
                                                        },
                                        'client-date' => 'Mon, 02 Oct 2017 15:56:40 GMT'
                                      }, 'HTTP::Headers' )
               }, 'HTTP::Response' );
efetch • 2.5k views
ADD COMMENTlink modified 4 months ago by indexofire30 • written 21 months ago by traviata10

I am unable to replicate the error, are you sure that the edirect eutils are installed properly?

ADD REPLYlink written 21 months ago by Sej Modha4.2k

Probably conflict of Perl versions. What is the result of

which perl

and

head -n1 $(which efetch)
ADD REPLYlink written 21 months ago by h.mon26k

I've installed all the conda packages in your list. It still pop out the error msg. any ideas?

ADD REPLYlink written 4 months ago by indexofire30
7
gravatar for tarek.mohamed
21 months ago by
tarek.mohamed250
tarek.mohamed250 wrote:

Hi,

How did you install Entrez direct tool?

This is due to a mistake in the installation of Entrez direct tool. Try this code to install it!

mkdir -p ~/src 
curl https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/edirect.zip > ~/src/edirect.zip 
unzip -o ~/src/edirect.zip  -d ~/src 
echo 'export PATH=~/src/edirect:$PATH' >> ~/.bashrc 
source  ~/.bashrc

Tarek

ADD COMMENTlink modified 21 months ago • written 21 months ago by tarek.mohamed250

Your solution worked. Thanks so much!

ADD REPLYlink written 21 months ago by traviata10
3
gravatar for Liam Thompson
5 months ago by
Liam Thompson140
Gothenburg, Sweden
Liam Thompson140 wrote:

For those who have installed entrez-direct using Conda virtual environment, and are encountering the error above, you can install the libraries in the following way into the already activated virtual environment.

conda install perl-io-socket-ssl perl-net-ssleay perl-lwp-protocol-https entrez-direct
ADD COMMENTlink written 5 months ago by Liam Thompson140

add -c bioconda if bioconda is not in your channels already

ADD REPLYlink modified 4 months ago • written 4 months ago by russel26200
2
gravatar for Jinguo
10 months ago by
Jinguo20
Jinguo20 wrote:

I met the same problem when I use efetch, but the given solutions didn't work out.

I tried

cpanm Crypt::SSLeay IO::Socket::SSL::Utils LWP::Protocol::https

and it worked!

ADD COMMENTlink written 10 months ago by Jinguo20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 717 users visited in the last hour