Skip to content

Instantly share code, notes, and snippets.

@rsarai
Forked from geek-id/Problem Solving
Created December 3, 2018 16:25
Show Gist options
  • Save rsarai/c57998b8ce923b1a812f71ce13be1bda to your computer and use it in GitHub Desktop.
Save rsarai/c57998b8ce923b1a812f71ce13be1bda to your computer and use it in GitHub Desktop.
Problem Solving in Linux
[error]
ImportError: No module named '_gdbm'
[solved]
sudo apt-get install python3.5-gdbm
[error]
ImportError: No module named 'apt_pkg'
[solved]
locate apt_pkg.so
sudo ln -s /usr/lib/python3/dist-packages/apt_pkg.cpython-34m-x86_64-linux-gnu.so /usr/lib/python3/dist-packages/apt_pkg.so
// Install Python 3.5.2
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update && sudo apt-get install python3.5
// Install Atom Editor
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update && sudo apt-get install atom
// Install python pip
sudo apt-get install python-pip python3-pip -y
// update-alternative python3
update-alternative --config python3
update-alternative --install /usr/bin/python3 python3 /usr/bin/python3.5 10
// Install IPython
sudo apt-get install ipython ipython3 ipython3-notebook
// Install Ruby on Rails Ubuntu 14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.4.0
rvm use 2.4.0 --default
ruby -v
gem install bundler
git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR@EMAIL.com"
ssh-keygen -t rsa -b 4096 -C "YOUR@EMAIL.com"
# Paste ssh-keygen here : https://github.com/settings/keys
cat ~/.ssh/id_rsa.pub
ssh -T git@github.com
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
gem install rails -v 5.0.1
rbenv rehash
*if rbenv not installed, running this command "sudo apt-get install rbenv"
rails -v
sudo apt-get install mysql-server mysql-client libmysqlclient-dev
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list"
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-common
sudo apt-get install postgresql-9.5 libpq-dev
sudo -u postgres createuser chris -s
# If you would like to set a password for the user, you can do the following
sudo -u postgres psql
postgres=# \password chris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment