doulian8485
2016-11-01 09:45
浏览 59
已采纳

不能在kali linux上安装laravel

These codes which I have written terminal

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

mv composer.phar /usr/local/bin/composer

Composer is working.

After that I downloaded laravel without error.

composer global require "laravel/installer"

But When I write ~/.composer/vendor/bin/laravel in terminal it gives me error

bash: /root/.composer/vendor/bin/laravel: No such file or directory

Where is my problem?I dont get it.

EDIT:

find /root/ -name laravel

./.config/composer/vendor/bin/laravel
./.config/composer/vendor/laravel
./.config/composer/vendor/laravel/installer/laravel
./.cache/composer/files/laravel

图片转代码服务由CSDN问答提供 功能建议

我编写的这些代码终端

  php -r  “copy('https://getcomposer.org/installer','composer-setup.php');”
 
nphp -r“if(hash_file('SHA384','composer-setup.php')==='  e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae '){回波 '安装程序验证';}其他{回声 '安装腐败';解除连结(' 作曲家-setup.php ');}回声PHP_EOL; “\ NPHP作曲家-setup.php \ NPHP -R” 的unlink('  composer-setup.php');“
 
mv composer.phar / usr / local / bin / composer 
   
 
 

Composer正在运行。 \ n

之后我没有错误地下载了laravel。

  composer global require“laravel / installer”
   
 
  

但是当我在终端中写〜/ .composer / vendor / bin / laravel 时,它会给我错误

  bash:/ root /。  composer / vendor / bin / laravel:没有这样的文件或目录
   
 
 

我的问题在哪里?我不明白。

编辑:

< em> find / root / -name laravel

  ./.config / composer / vendor / bin / laravel 
 ./.config / composer / vendor /  laravel 
 ./.config / composer / vendor / laravel / installer / laravel 
 ./.cache / composer / files / laravel 
   
 
  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doumao1887 2016-11-01 10:18
    已采纳

    You can simply run composer create-project --prefer-dist laravel/laravel blog to install Laravel in blog directory.

    Then you go into blog directory and run php artisan serve. Now your Laravel should already be online.

    Check this document for the Laravel installation https://laravel.com/docs/5.3/#installing-laravel.

    已采纳该答案
    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题