Skip to content

Instantly share code, notes, and snippets.

@hisplan
Last active August 30, 2022 16:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hisplan/541af29bb667066430e799ab8cde02d0 to your computer and use it in GitHub Desktop.
Save hisplan/541af29bb667066430e799ab8cde02d0 to your computer and use it in GitHub Desktop.
How to Install samtools on CentOS or Ubuntu

For CentOS

sudo yum group install "Development Tools"
sudo yum install ncurses-devel bzip2-devel xz-devel

cd /tmp
wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2
tar xvjf samtools-1.9.tar.bz2
cd samtools-1.9
./configure --prefix=/usr/local
make
sudo make install

For Debian or Ubuntu

sudo apt-get install libncurses5-dev zlib1g-dev libbz2-dev liblzma-dev

cd /tmp
wget https://github.com/samtools/samtools/releases/download/1.9/samtools-1.9.tar.bz2
tar xvjf samtools-1.9.tar.bz2
cd samtools-1.9
./configure --prefix=/usr/local
make
sudo make install

Mac Mojave

wget https://github.com/samtools/samtools/releases/download/1.10/samtools-1.10.tar.bz2
cd samtools-1.10
make
cp samtools /usr/local/bin/

Reference: http://www.htslib.org/download/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment