biostars / biostar-handbook

Issue tracker for the Biostar Handbook
57 stars 12 forks source link

Unable to download openjdk and mkl packages #39

Open Nekochef opened 6 years ago

Nekochef commented 6 years ago

Hi, I'm working through the environment setup stage.

I entered bioinfo environment, and executed curl http://data.biostarhandbook.com/install/conda.txt | xargs conda install -y to automatically install all tools needed, however, I got stuck when downloading openjdk and mkl, the speed is too slow and the connection would get lost. I tried to manually install openjdk 8 by excuting sudo apt-get install openjdk-8-jre, but I was informed that:

openjdk-8-jre is already the newest version (8u162-b12-0ubuntu0.16.04.2). openjdk-8-jre set to manually installed.

Is there any workaround?

Nekochef commented 6 years ago

A workaround for Chinese users only: Due to the GFW and the far distance, connections to some conda sources could be very slow, thus we should employ a faster mirror from Tsinghua University, see https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/ for more details to add new channels to your conda configuration. If you are in another region that is also suffering this issue, please find your own proper mirrors.

But even if you added a mirror, the installation could get stuck on some packages. Till now I've got stuck on the following packages: mkl, openjdk, and emboss, but perhaps you could get stuck on some other packages. The solutions are similar: firstly execute curl http://data.biostarhandbook.com/install/conda.txt | xargs conda install -y observe which package fails in the download process, remember the package name and its version, install it individually from the mirror. Repeat these procedures until all fails are wiped out. If the connection to the mirror failed, just try it again. It cannot get worse.

Here are some examples.

For the mkl package, simply type: conda install mkl --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ --override-channels This will lead to the latest mkl package from /main. For the openjdk package, we should install a previous version from /free: conda install openjdk=8.0.121 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ --override-channels This will lead to openjdk 8.0.121-1 For the emboss package, we should get it from the bioconda mirror: conda install emboss=6.5.7 --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/ --override-channels

Try all mirrors if a package is not available in one of them. I'm not familiar with linux and conda, so please comment if you have better solutions.

I resolved this issue finally, hope it can help you too.

ialbert commented 6 years ago

Thanks for sharing, I will add a link to this post into the book.

Nekochef commented 6 years ago

Hi @ialbert , I would like to add a bit. Downloading directly from ubuntu official source could be very slow, too. In my network condition, install R base through apt-get is no easy task. For users in China, I would suggest you to change your default sources to Tsinghua mirrors. See https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/ for details. You should type sudo nano /etc/apt/sources.list, replace its content to

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

Then save and exit. Remember to backup sources.list before you edit it.

Before installing R base, don't forget to update your package lists: sudo apt-get update And install R base: sudo apt-get install r-base r-base-dev

At last, doctor.py suggests that everything is OK.

# Doctor! Doctor! Give me the news.
# Checking 15 symptoms...
# Optional program not found: wonderdump
# Optional program not found: global-align.sh
# Optional program not found: local-align.sh
# You are doing well!