zoukankan      html  css  js  c++  java
  • linux安装phantomjs,-bash: /usr/local/bin/phantomjs: is a directory解决方案

    首先安装依赖——fontconfig和freetype
    yum install fontconfig freetype2
    在官网上下载对应版本的包
    http://phantomjs.org/download.html
    rz 上传到服务器
    tar -xvf 解压 不要+z
    设置软连接
    ln -sf /home/phantomjs-2.1.1-linux-i686/bin/phantomjs /usr/local/bin/phantomjs
    配置环境
    1)vim /etc/profile
    2)在文件的最后一行,添加安装路径path语句:(注意路径是phantomjs的安装路径)
    export PATH=${PATH}:/usr/local/src/phantomjs/bin/
    3)保存修改后的文件
    :wq
    4)使用命令使环境变量生效
    source /etc/profile
    最后一步,查看版本
    phantomjs -v
    如果出来版本号,即成功


    ————————————————
    原文链接:https://blog.csdn.net/qq_35309220/article/details/90411819

  • 相关阅读:
    Flask--目录
    Linux相关目录
    Mac 提示错误”xcrun: error“
    subprocess模块
    压缩模块
    GitPython模块
    Ansible-ansible命令
    YAML语法
    Ansible-安装
    Ansible-概念
  • 原文地址:https://www.cnblogs.com/aaronguo/p/11422642.html
Copyright © 2011-2022 走看看