Sometimes we want to quickly check if we have a required package installed, for example a developer library we need to compile our code.
If you are running a Debian based Linux system such as Ubuntu, you have a couple of alternatives. Using
apt, let’s say we are looking for
python3-dev since it is required to debug python code through gdb:
However, you will notice
apt is pretty slow and we will be greeted by the warning
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.. Moreover, the output is not so nice if we want to parse it in a scripted way. A faster alternative is provided by
If you are a *nix geek like me you can’t but love the command prompt.
One of the best tool to improve the plain old terminal is an utility called tmux. You can install through Homebrew.
Now, there are many commands to remember to play nicely with the terminal, and sometimes a little remind might be useful, that’s why cheat sheets exist.
Here is mine, enjoy.
If you run a linux guest VM, every time you update the kernel you need to reinstall VMwareTools for optimal performances.
After selecting Virtual Machine > Install VMware Tools you need to untar the archive and then run a script that ask you many question, etc.
This can be very tedious, so this is a little script that minimize typing:
VMware now recommends to use the
open-vm-tools-desktop provided by the Linux distribution of your choice.
NOTE: -d option implies default answers to install script (most of the time they are ok)
NOTE2: the script create a directory on Desktop with all directories shared by the host system with the VM
NOTE3: this script has been tested only on Ubuntu 12.04 LTS
NOTE4: this script install native VMware Tools, if you want you can install open tools instead, but you can’t install both at the same time!
Second, reference system: Ubuntu Linux LTS 12.04.x
32bit 64bit (see this comment).
Third, [NEW] installation:
Done. It’s that simple now 😎
If it fails to compile, see THIS comment.
If you still do not succeed see THIS comment.
With recent version of Ubuntu (14.04 and 16.04) you might need to downgrade Bison, see THIS comment.
- install needed packages:
- create a directory, then download software to compile:
- compile mysql-proxy:
- build CryptDB on MySQL:
- Build CryptDB:
- now, it’s time to read
cryptdb/doc/README, enjoy! 😉
NOTE1: you should create a user
mysql to run DBMS for security reasons:
sudo groupadd mysql
sudo useradd -r -g mysql mysql
NOTE2: be very careful on each step and you wont fail.
Ubuntu guest instances in VMware sometimes come up with the boot error message:
This error is being caused because VMware doesn’t actually provide that level interface for CPU access, but Ubuntu try to load the kernel module anyway.
How to fix it:
- add the line:
NOTE: for older versions use
blacklist i2c_piix4 instead.
NOTE: it works both in VMWare Fusion 5 and 6, and Ubuntu LTS 12.04 and 14.04