環境
CentOS release 6.5
事象
karmaでPhantomJSを起動しようとするとエラーでこけた。エラーは以下。
ERROR [launcher]: Cannot start PhantomJS xx/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
解決
fontconfig をインストールすることで正常に起動するようになった。
$ yum -y install fontconfig-devel
15 12 2017 15:16:49.997:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency 15 12 2017 15:16:50.035:INFO [launcher]: Starting browser PhantomJS