【问题标题】:sh: 1: laravel: not foundsh:1:laravel:未找到
【发布时间】:2016-08-21 05:45:03
【问题描述】:

当我运行命令时,我已经注册了 spark 令牌并且 spark 已经安装在我的 ubuntu 机器上

spark new application

它显示以下错误,


sh: 1: laravel: not found
Downloading Spark...
PHP Warning:  file_put_contents(/home/abrar/testnetic/spark-archive.zip): failed to open stream: No such file or directory in /home/abrar/spark-installer/src/Installation/DownloadSpark.php on line 61
PHP Warning:  ZipArchive::extractTo(): Invalid or unitialized Zip object in /home/abrar/spark-installer/src/Installation/DownloadSpark.php on line 106
PHP Warning:  ZipArchive::close(): Invalid or unitialized Zip object in /home/abrar/spark-installer/src/Installation/DownloadSpark.php on line 108
PHP Notice:  Undefined offset: 0 in /home/abrar/spark-installer/src/Installation/DownloadSpark.php on line 121
PHP Warning:  file_get_contents(/home/abrar/testnetic/composer.json): failed to open stream: No such file or directory in /home/abrar/spark-installer/src/Installation/UpdateComposerFile.php on line 56
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package laravel/spark could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see  for more details.

Read  for further common problems.
PHP Warning:  file_get_contents(/home/abrar/testnetic/config/app.php): failed to open stream: No such file or directory in /home/abrar/spark-installer/src/Installation/AddCoreProviderToConfiguration.php on line 32
PHP Warning:  file_put_contents(/home/abrar/testnetic/config/app.php): failed to open stream: No such file or directory in /home/abrar/spark-installer/src/Installation/AddCoreProviderToConfiguration.php on line 40
Could not open input file: artisan
PHP Warning:  file_get_contents(/home/abrar/testnetic/config/app.php): failed to open stream: No such file or directory in /home/abrar/spark-installer/src/Installation/AddAppProviderToConfiguration.php on line 32
PHP Warning:  file_put_contents(/home/abrar/testnetic/config/app.php): failed to open stream: No such file or directory in /home/abrar/spark-installer/src/Installation/AddAppProviderToConfiguration.php on line 46

 Would you like to install the NPM dependencies? (yes/no) [yes]:
 > yes

Installing NPM Dependencies...
npm ERR! install Couldn't read dependencies
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.4.2
npm ERR! npm  v2.15.0
npm ERR! path /home/abrar/testnetic/package.json
npm ERR! code ENOPACKAGEJSON
npm ERR! errno -2
npm ERR! syscall open

npm ERR! package.json ENOENT: no such file or directory, open '/home/abrar/testnetic/package.json'
npm ERR! package.json This is most likely not a problem with npm itself.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/abrar/testnetic/npm-debug.log

 Would you like to run Gulp? (yes/no) [yes]:
 > yes

Running Gulp...
[10:53:52] No gulpfile found

从 github 克隆 spark-installer 后,我运行命令

composer install
并且我已将 spark-installer 目录添加到我的系统路径中。

【问题讨论】:

    标签: ubuntu installation laravel-5.2 laravel-spark


    【解决方案1】:

    似乎 laravel 二进制文件不可用。检查它是否正确安装,并且

    ~/.composer/vendor/bin
    

    被添加到 $PATH。在控制台中输入“laravel”应该不会出错。如果有,请参考laravel安装手册:https://laravel.com/docs/master/installation

    【讨论】:

    • 路径可能是 ~/.config/composer/vendor/bin 取决于版本
    猜你喜欢
    • 2017-01-19
    • 2021-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-15
    • 1970-01-01
    • 2021-10-05
    • 2021-03-26
    相关资源
    最近更新 更多