ubuntu(linux)运行phantomjs错误

错误信息:phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

解决办法:sudo apt-get install freetype-devel fontconfig-devel

如果运行以上命令出现以下错误:

E: Unable to locate package freetype-devel
E: Unable to locate package fontconfig-devel

再运行以下命令解决:sudo apt-get install fontconfig