How to install Docker

There are two ways to install Docker CE (Community Edition): using its repository or by directly installing its package file. Using the repository is highly recommended.

  • Repository install: Follow the steps listed here to do this.

  • Package install: Go to https://download.docker.com/linux/ubuntu/dists/. Pick your Ubuntu version. 16.04 is Xenial for example. Then pick pool/stable/amd64/ and then download the latest DEB files for docker-ce-cli, containerd.io and docker-ce. Install these packages in the same order.

  • Remember to add your username to the docker group:

$ sudo adduser joe docker
  • You will need to logout and login for the group assignment to take effect. If you find that logout-login to be painful, try this trick.

  • Try Docker and see if it works:

$ docker run hello-world

Tried with: Docker 17.09 and Ubuntu 16.04

How to install ASCIIDoctor

From Ubuntu repositories

This is easy, but the ASCIIDoctor version and the default theme it uses is ancient:

$ sudo apt install asciidoctor

$ aptitude show asciidoctor
Package: asciidoctor
Version: 0.1.4-1

From Ruby Gems

This is a more updated version with an updated theme:

$ sudo gem install asciidoctor

$ gem list asciidoctor

*** LOCAL GEMS ***

asciidoctor (1.5.2)

How to uninstall a make install

Many libraries can only be installed by building from source and installing using make install. Removing these installations can be quite painful.

In some rare cases, these Makefiles are written to support uninstall. In that case, you can go the same directory from where you did make install and try make uninstall. The only library I’ve seen supporting this is OpenCV.

For other installs which do not support uninstall, I highly recommend installing using checkinstall as described here.

Tried with: Ubuntu 14.04

Feature transfer error: Access is denied

Problem

A friend of mine was trying to install the EMTrade program on Windows 8.1. He was logged in as a standard user, but when the installer asked for administrator permissions using User Account Control (UAC), he provided the login and password of an administrator account. The installer proceeded to install, but failed while creating the C:\Program Files\Emkay directory, with this error:

Feature transfer error
File: C:Program FilesEmkay
Access is denied

Solution

A few old installers for Windows still struggle with UAC. The EMTrade installer worked fine when I explicitly switched user, logged into an administrator account and installed from inside it.

Tried with: Windows 8.1

How to install Fish

Fish is a modern shell that has user-friendly features like colors and auto-completion and works right out of the box.

Ubuntu already ships Fish, so installing it is easy:

$ sudo apt install fish

The version of Fish that Ubuntu maintains is quite old. Fish is under active development, with lots of new features added regularly. If you want the latest stable version of Fish:

$ sudo apt remove fish
$ sudo add-apt-repository ppa:fish-shell/release-2
$ sudo apt-get update
$ sudo apt install fish

If you want the latest beta version of Fish:

$ sudo apt remove fish
$ sudo add-apt-repository ppa:fish-shell/beta-2
$ sudo apt-get update
$ sudo apt install fish

Tried with: Fish 2.2b1 and Ubuntu 14.04

CUDA installation error of unmet dependencies

I was trying to install CUDA and got this error:

$ sudo apt-get install cuda
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cuda : Depends: cuda-6-5 (= 6.5-14) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

On searching, a lot of folks had this error. Their errors were solved when they removed old NVIDIA packages they had installed. But, I did not have any NVIDIA package installed!

What were these broken packages I had on the system, I didn’t know! I followed the dependency chain by trying to install cuda-6-5, which complained on another package and so on. In the end, I found that I had a lot of unnecessary packages, all of which had :i386 at the end of their name.

The strangest part was that running sudo apt-get autoremove had no effect on these packages, they were not removed. So, I manually removed all of them using sudo apt-get remove.

When I tried to install CUDA after this, it worked fine! 🙂

Tried with: Ubuntu 14.04

How to install CUDA 6.5 on Ubuntu 14.04

Installing CUDA is becoming increasingly easier on Ubuntu. I think I keep hitting problems because I am usually updating from an older NVIDIA graphics driver or CUDA version. NVIDIA continues to be quite bad at providing error-free upgrades. Anyway, this is what worked for me:

  • Do not try to install any of the NVIDIA drivers or CUDA packages that are in the Ubuntu repositories. I wasted a day with the errors these operations threw up!

  • Uninstall all CUDA packages and NVIDIA drivers you may have on your Ubuntu system.

  • Download the CUDA .deb package for Ubuntu 14.04 from here. For me, it was a cuda-repo-ubuntu1404_6.5-14_amd64.deb file.

  • The .deb file just adds a CUDA repository maintained by NVIDIA. Install this .deb file and update:

$ sudo gdebi cuda-repo-ubuntu1404_6.5-14_amd64.deb
$ sudo apt-get update
  • Installing CUDA now is easy as this:
$ sudo apt-get install cuda

This is a big install, it will install everything including a nvidia-340 driver that actually worked and NVIDIA NSight. After the install, reboot the computer. Your CUDA is ready for work now 🙂

Note: I tried this on two systems. On one, it installed without any problem. On the other, it gave an error of unmet dependencies. I have described here how I solved this problem.

Tried with: NVIDIA GeForce GTS 250 and NVIDIA GTX Titan