sh:1:laravel:没找到

时间:2016-04-27 05:38:29

标签: ubuntu installation laravel-5.2 laravel-spark

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

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目录添加到我的系统路径。

1 个答案:

答案 0 :(得分:2)

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

~/.composer/vendor/bin

添加到$ PATH。打字" laravel"在控制台中不应该给出错误。如果是这样,请参阅laravel安装手册:https://laravel.com/docs/master/installation