>  Q&A  >  본문

centos - 安装phantomjs后输入phantomjs --v提示:-bash:phantomjs:command not found

centos,按照网上的教程:

sudo yum install gcc gcc-c++ make git openssl-devel freetype-devel fontconfig-devel 
git clone git://github.com/ariya/phantomjs.git 
cd phantomjs 
git checkout 1.9 
./build.sh  

安装了一个多小时完成后输入phantomjs --v,显示-bash:phantomjs:command not found,请问该怎么办?

世界只因有你世界只因有你2733일 전818

모든 응답(5)나는 대답할 것이다

  • 滿天的星座

    滿天的星座2017-04-25 09:03:29

    phantomjs가 PATH에 실행 경로를 추가하지 않은 것으로 추정됩니다.

    으아아아

    마지막에 다음을 추가하세요.

    으아아아

    회신하다
    0
  • 怪我咯

    怪我咯2017-04-25 09:03:29

    1층의 방법을 시도해 보세요. 그래도 안 되면 다음 문장을 추가해 보세요.

    으아악

    /usr/local/bin/phantomjs을 설치 후 바이너리 파일 경로로 바꾸세요.

    회신하다
    0
  • PHPz

    PHPz2017-04-25 09:03:29

    같은 문제가 발생했는데 어떻게 해결했나요?

    회신하다
    0
  • PHP中文网

    PHP中文网2017-04-25 09:03:29

    ln -s /usr/local/src/phantomjs/bin/phantomjs /usr/local/bin/
    /usr/local/src/phantomjs/bin/phantomjs가 설치 경로입니다

    회신하다
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-25 09:03:29

    root/phantomjs/bin/phantomjs를 system/bin에 복사하세요

    회신하다
    0
  • 취소회신하다