LoginSignup
2
2

More than 5 years have passed since last update.

PhantomJSが"Killed: 9"で動かないとき

Last updated at Posted at 2016-01-20

こんばんは :whale2:

ある日、homebrewでインストールしたphantomjs(2.0.0)が動かなかったのです。

$ phantomjs
Killed: 9

対処法

# upx インストール
$ brew install upx

# シンボリックリンクの実体確認
$ readlink `which phantomjs`
/opt/homebrew-cask/Caskroom/phantomjs/2.0.0/phantomjs-2.0.0-macosx/bin/phantomjs

# Unpack実行
$ upx -d /opt/homebrew-cask/Caskroom/phantomjs/2.0.0/phantomjs-2.0.0-macosx/bin/phantomjs
                       Ultimate Packer for eXecutables
                          Copyright (C) 1996 - 2013
UPX 3.91        Markus Oberhumer, Laszlo Molnar & John Reiser   Sep 30th 2013

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
  40624568 <-  14588338   35.91%   Mach/AMD64    phantomjs

Unpacked 1 file.

動作確認

hello.js
"use strict";

console.log('Hello, world!');
phantom.exit();
確認
$ phantomjs -v
2.0.0

$ phantomjs hello.js
Hello, world!

動いた。よかった。
おわりです。

参考と注釈

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2