Ensembl / Bio-DB-HTS

Git repo for Bio::DB::HTS module on CPAN, providing Perl links into HTSlib
Apache License 2.0
24 stars 16 forks source link

Install fails with "cannot remove path when cwd is /tmp/SokefcfsUv/Bio-DB-HTS" #86

Closed MurphyDavid closed 5 years ago

MurphyDavid commented 5 years ago

On an ubuntu server I've been trying to install Bio-DB-HT

Running these commands

git clone https://github.com/Ensembl/Bio-DB-HT
cd Bio-DB-HTS/
sudo perl INSTALL.pl

It fails with this error. it does not prompt for password as I was already running with sudo.

Running the same command without sudo gives a prompt but the same error

switching to root with sudo su root gives the same results.

*** Installing Bio::DB::HTS using sudo. You will be asked for your password. ***

*** If this step fails because sudo isn't installed, go back and run this script again as superuser. ***
Couldn't install system-wide: 0 at INSTALL.pl line 212.
cannot remove path when cwd is /tmp/SokefcfsUv/Bio-DB-HTS for /tmp/SokefcfsUv:  at /usr/share/perl/5.22/File/Temp.pm line 778.
mira13 commented 5 years ago

Hi, @MurphyDavid

This should work:

wget https://github.com/samtools/htslib/releases/download/1.8/htslib-1.8.tar.bz2 && \
tar xvf htslib-1.8.tar.bz2 && \
cd htslib-1.8 && \
./configure && \
make && \
make install && \
cpanm Bio::DB::HTS
avullo commented 5 years ago

Hi @MurphyDavid, thanks for reporting this.

I don't know whether you've followed @mira13 suggestion. If you haven't, I've just pushed a fix which allows you to use the same installation method you've already used, i.e. the install script. Technically speaking, you don't need to run the install script with sudo, as it will spawn a separate process with sudo when it comes to install the library components.

MurphyDavid commented 5 years ago

Sorry for not getting back to you guys.

mira13's worked. Thanks for the update!

avullo commented 5 years ago

Thanks @MurphyDavid

I'm glad this is sorted, but was curious to see if the method you've previously used works now.

MurphyDavid commented 5 years ago

git clone + install now works. Reached

Bio::DB::HTS v2.11 is now installed.

avullo commented 5 years ago

Excellent, thanks @MurphyDavid!