postgresqlを止める on ubuntu 16.04

linux - Stopping postgresql from starting on ubuntu startup - Stack Overflow

systemctl stop postgresql
systemctl status postgresql
systemctl disable postgresql

pg_ctl、initdbをubuntu 16.04で使うには

Ubuntu で PostgreSQL を使ってみよう(続編) | Let's Postgres

Ubuntupostgresqlは特有の環境を持っているためコマンドも違っている。pg_ctlやinitdbなどは直接使わないようになっているが、実行ファイルやライブラリは存在しているので、PATHとLD_LIBRARY_PATHを通せば使えるらしい。もちろん推奨されていない。

/usr/lib/postgresql/[version]/bin
/usr/lib/postgresql/[verison]/lib

postgresqlのアンインストール on ubuntu 16.04

sudo aptitude purge postgresql postgresql-9.5 postgresql-client postgresql-client-9.5 postgresql-client-common postgresql-common postgresql-contrib-9.5 postgresql-server-dev-9.5 postgresql-server-dev-9.5
sudo rm -rf /var/lib/postgresql/
sudo rm -rf /var/log/postgresql/
sudo rm -rf /etc/postgresql/

macOS mojave, conda, clang, cmake

C++コードに対してmacOS mojaveとcondaのcompiler toolsでcmakeを使うとリンカのテストのあたりでコケる。-DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++'とするとcmakeとmakeが通る。

conda, libiomp5, libomp, omp.h, llvm-openmp

libiomp5はlibompとおおよそ互換という話だけど、intel-openmpにはomp.hが入っていないのでllvm-openmpのインストールが必要になる。

mkl-include

mkl_lapacke.hが入っている。

macOS + conda + matplotlibがコケる

最近、macOS + conda + matplotlibがコケるようになった。以下の記事に従ってTkaggにすることで解決した。

pyenvとvirtualenvで環境構築した時にmatplotlib.pyplotが使えなかった時の対処法 - Qiita

具体的には$MATPLOTLIBRCをセットして、$MATPLOTLIBRC/matplotlibrcファイルを作ってbackendをTkaggにする。

export MATPLOTLIBRC=~

Customizing Matplotlib with style sheets and rcParams — Matplotlib 3.0.2 documentation