Skip to content

Instantly share code, notes, and snippets.

@codenoid
Last active March 1, 2020 07:00
Show Gist options
  • Save codenoid/c9c172d6ab99c8de0130d940a3d9fe83 to your computer and use it in GitHub Desktop.
Save codenoid/c9c172d6ab99c8de0130d940a3d9fe83 to your computer and use it in GitHub Desktop.

Step 1. Installing all required libraries for ubuntu :

sudo apt-get install \
  libbsd-dev \
  libedit-dev \
  libevent-core-2.0-5 \
  libevent-dev \
  libevent-extra-2.0-5 \
  libevent-openssl-2.0-5 \
  libevent-pthreads-2.0-5 \
  libgmp-dev \
  libgmpxx4ldbl \
  libssl-dev \
  libxml2-dev \
  libyaml-dev \
  libreadline-dev \
  automake \
  libtool \
  git \
  llvm \
  libpcre3-dev \
  libgc-dev \
  zlib1g-dev \
  build-essential -y

Step 2: Adding the Crystal Repository Before installing any packages on the Ubuntu server instance, it is recommended to update the system. Log in using the sudo user and run the following commands to update the system. Automatically :

curl https://dist.crystal-lang.org/apt/setup.sh | sudo bash

Manually :

apt-key adv --keyserver keys.gnupg.net --recv-keys 09617FD37CC06B54
echo "deb https://dist.crystal-lang.org/apt crystal main" > /etc/apt/sources.list.d/crystal.list
apt-get update

Step 3: Installing Crystal After the repository is added, then we can now install crystal directly by :

sudo apt-get install crystal

sudo apt-get install \
  libbsd-dev \
  libedit-dev \
  libevent-core-2.1-6 \
  libevent-dev \
  libevent-extra-2.1-6 \
  libevent-openssl-2.1-6 \
  libevent-pthreads-2.1-6 \
  libgmp-dev \
  libgmpxx4ldbl \
  libssl-dev \
  libxml2-dev \
  libyaml-dev \
  libreadline-dev \
  automake \
  libtool \
  git \
  llvm \
  libpcre3-dev \
  libgc-dev \
  zlib1g-dev \
  build-essential -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment