【问题标题】:Success compilation of phantomjs on Raspberry 2 but not executing (libjpeg.so.8)在Raspberry 2上成功编译phantomjs但未执行(libjpeg.so.8)
【发布时间】:2015-06-05 09:00:58
【问题描述】:

在我的带有 OSMC 更新版本的树莓派 2 中,我想在 python 中使用带有 selenium 的 PhantomJS 并尝试编译它。

点击此链接: How to compile phantomjs on the raspberry pi 2

还有这个链接:Adding swap for the raspberry pi

在 U 盘中创建 16Gb 的交换文件并正确编译 phantomjs。

当我尝试执行它时:

phantomjs --version

我收到以下错误:

phantomjs: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory

我在此处和 google 上搜索了有关安装此文件的信息,但找不到信息。尝试从github为raspberry pi2安装二进制phantomjs并得到相同的错误,这就是尝试编译它的原因,但收到相同的错误。

我该如何解决这个问题?

【问题讨论】:

    标签: compilation phantomjs raspbian libjpeg raspberry-pi2


    【解决方案1】:

    问题解决了。

    当尝试执行编译后的二进制文件时,问题在于以下命令:

    $ cd /home/TOSHIBA/fuente/phantomjs/bin
    $ phantomjs
    

    正在执行从另一个用户的 github 下载的 /usr/bin 上安装的以前的二进制版本 (2.0.0)。

    现在问题通过我的 Raspberry2 上的编译二进制解决了:

    $ cd /home/TOSHIBA/fuente/phantomjs/bin
    $ ./phantomjs --version
        2.0.1-development
    $ ldd phantomjs
        libicudata.so.52 => /usr/lib/arm-linux-gnueabihf/libicudata.so.52 (0x758d0000)
        libssl.so.1.0.0 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.0.0 (0x75887000)
        libcrypto.so.1.0.0 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0 (0x75762000)
        libfontconfig.so.1 => /usr/lib/arm-linux-gnueabihf/libfontconfig.so.1 (0x7572a000)
        libfreetype.so.6 => /usr/lib/arm-linux-gnueabihf/libfreetype.so.6 (0x756b5000)
        libjpeg.so.62 => /usr/lib/arm-linux-gnueabihf/libjpeg.so.62 (0x7566c000)
        libpng12.so.0 => /lib/arm-linux-gnueabihf/libpng12.so.0 (0x75642000)
        libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x75620000)
        libicui18n.so.52 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.52 (0x754c8000)
        libicuuc.so.52 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.52 (0x753bc000)
        libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x753a9000)
        librt.so.1 => /lib/arm-linux-gnueabihf/librt.so.1 (0x75392000)
        libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x7536f000)
        libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x752b8000)
        libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x75244000)
        libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x7521b000)
        libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x7512c000)
        /lib/ld-linux-armhf.so.3 (0x76f56000)
        libexpat.so.1 => /lib/arm-linux-gnueabihf/libexpat.so.1 (0x75104000)
    

    如果有人有兴趣,我已将二进制压缩版本上传到我的 Dropbox 帐户,您可以在这里下载:

    PhantomJS 2.0.1-development binary for Raspberry-Pi2

    【讨论】:

    • 感谢 Jorge,为了让您的 PhantomJS-Binary 在 Raspbian 上运行,这仍然取决于 wheezy,我必须通过 libjpeg-dev 和 icu-devtools 从 Jessie 安装 libicu*52 和 libjpeg62。在编译之前失败时工作得很好。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-02
    相关资源
    最近更新 更多