Support the ongoing development of Laravel.io →
Installation Laravel Spark
Last updated 2 years ago.
0

It might help if you write out what exactly you are doing, and copy the exact error you are getting. This is too high level for anyone to help you out.

0

Composer is installed on my machine and when i attempt to install laravel i get this: _

** Wilsons-iMac:~ mac$ php laravel install Could not open input file: laravel

**_ if i just type laravel i get: Wilsons-iMac:~ mac$ laravel -bash: laravel: command not found

Last updated 7 years ago.
0

Have you installed laravel before you tried executing that command?

composer global require "laravel/installer"
0

No, i have never been able to install laravel.

0

Once you run the composer global require “laravel-installer” that denjaland suggests, the laravel command should be available globally. From there, run laravel new projectname

0

I ran these commands and got these errors Wilsons-iMac:~ mac$ laravel hiddentreasure -bash: laravel: command not found Wilsons-iMac:~ mac$ laravel -bash: laravel: command not found Wilsons-iMac:~ mac$

0

okay, but can you confirm that you ran composer global require "laravel/installer"? If so, laravel is installed, you just need to make sure your OS knows where to search for the executable when you run laravel. Therefore, you need to make sure that your composer vendor/bin path is in the $path array used by your OS to scan for your executables. THis depends on your OS though.

It's all in the laravel installation instructions...

0

I executed these commands and got these results. Wilsons-iMac:~ mac$ composer create-project laravel/laravel your-project-name 4.2.* Installing laravel/laravel (v4.2.11)

  • Installing laravel/laravel (v4.2.11): Downloading (100%)
    Created project in your-project-name Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 31 installs, 0 updates, 0 removals
  • Installing symfony/translation (v2.7.29): Downloading (100%)
  • Installing paragonie/random_compat (v1.4.2): Downloading (100%)
  • Installing symfony/security-core (v2.7.29): Downloading (100%)
  • Installing symfony/routing (v2.7.29): Downloading (100%)
  • Installing symfony/process (v2.7.29): Downloading (100%)
  • Installing psr/log (1.0.2): Loading from cache
  • Installing symfony/debug (v2.7.29): Downloading (100%)
  • Installing symfony/polyfill-mbstring (v1.4.0): Loading from cache
  • Installing ircmaxell/password-compat (v1.0.4): Downloading (100%)
  • Installing symfony/http-foundation (v2.7.29): Downloading (100%)
  • Installing symfony/event-dispatcher (v2.8.22): Downloading (100%)
  • Installing symfony/http-kernel (v2.7.29): Downloading (100%)
  • Installing symfony/finder (v2.7.29): Downloading (100%)
  • Installing symfony/dom-crawler (v2.7.29): Downloading (100%)
  • Installing symfony/css-selector (v2.7.29): Downloading (100%)
  • Installing symfony/console (v2.7.29): Downloading (100%)
  • Installing symfony/browser-kit (v2.7.29): Downloading (100%)
  • Installing swiftmailer/swiftmailer (v5.4.8): Downloading (100%)
  • Installing stack/builder (v1.0.4): Downloading (100%)
  • Installing predis/predis (v0.8.7): Downloading (100%)
  • Installing phpseclib/phpseclib (0.3.10): Downloading (100%)
  • Installing patchwork/utf8 (v1.3.1): Downloading (100%)
  • Installing nesbot/carbon (1.22.1): Downloading (100%)
  • Installing monolog/monolog (1.23.0): Downloading (100%)
  • Installing nikic/php-parser (v0.9.5): Downloading (100%)
  • Installing jeremeamia/superclosure (1.0.2): Downloading (100%)
  • Installing filp/whoops (1.1.10): Downloading (100%)
  • Installing d11wtq/boris (v1.0.8): Downloading (100%)
  • Installing symfony/filesystem (v2.8.22): Downloading (100%)
  • Installing classpreloader/classpreloader (1.0.2): Downloading (100%) - Installing laravel/framework (v4.2.22): Downloading (100%)
    symfony/translation suggests installing symfony/config () symfony/translation suggests installing symfony/yaml () paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.) symfony/security-core suggests installing symfony/expression-language (For using the expression voter) symfony/security-core suggests installing symfony/validator (For using the user password constraint) symfony/routing suggests installing doctrine/annotations (For using the annotation loader) symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader) symfony/routing suggests installing symfony/expression-language (For using expression matching) symfony/routing suggests installing symfony/yaml (For using the YAML loader) symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/http-kernel suggests installing symfony/class-loader () symfony/http-kernel suggests installing symfony/config () symfony/http-kernel suggests installing symfony/dependency-injection () symfony/http-kernel suggests installing symfony/var-dumper () predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol) phpseclib/phpseclib suggests installing ext-mcrypt (Install the Mcrypt extension in order to speed up a wide variety of cryptographic operations.) phpseclib/phpseclib suggests installing ext-gmp (Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.) phpseclib/phpseclib suggests installing pear-pear/PHP_Compat (Install PHP_Compat to get phpseclib working on PHP < 4.3.3.) patchwork/utf8 suggests installing ext-intl (Use Intl for best performance) patchwork/utf8 suggests installing ext-wfio (Use WFIO for UTF-8 filesystem access on Windows) monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB) monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server) monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required)) monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server) monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server) monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver) monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib) monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome) monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar) monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server) monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server) d11wtq/boris suggests installing ext-pcntl (*) laravel/framework suggests installing doctrine/dbal (Allow renaming columns and dropping SQLite columns.) Writing lock file Generating autoload files

php artisan clear-compiled Mcrypt PHP extension required. Script php artisan clear-compiled handling the post-update-cmd event returned with error code 1 Wilsons-iMac:~ mac$ php artisan serve Could not open input file: artisan someone tried to get me to just execute that exact command. So I did this is the furthest i have gotten towards installing laravel. I want to run it from mamp, however it isnt even in the mamp directory. Should i move it it. Every time i execute any new install command it moves it without me issuing any commands? Is this normal?

0

Then i did this: Last login: Sun Jun 25 17:19:36 on ttys000 Wilsons-iMac:~ mac$ laravel -bash: laravel: command not found Wilsons-iMac:~ mac$ your-project-name -bash: your-project-name: command not found Wilsons-iMac:~ mac$ sublime your-project-name -bash: sublime: command not found Wilsons-iMac:~ mac$ composer create-project laravel/laravel laravel-demo Installing laravel/laravel (v5.4.23)

  • Installing laravel/laravel (v5.4.23): Downloading (100%)
    Created project in laravel-demo

php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 59 installs, 0 updates, 0 removals

  • Installing symfony/css-selector (v3.3.2): Downloading (100%)
  • Installing tijsverkoyen/css-to-inline-styles (2.2.0): Downloading (100%) - Installing symfony/polyfill-mbstring (v1.4.0): Loading from cache
  • Installing symfony/var-dumper (v3.3.2): Downloading (100%)
  • Installing jakub-onderka/php-console-color (0.1): Downloading (100%) - Installing jakub-onderka/php-console-highlighter (v0.3.2):Downloading (100%) - Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)
  • Installing nikic/php-parser (v3.0.5): Downloading (100%)
  • Installing psr/log (1.0.2): Loading from cache
  • Installing symfony/debug (v3.3.2): Loading from cache
  • Installing symfony/console (v3.3.2): Loading from cache
  • Installing psy/psysh (v0.8.8): Downloading (100%)
  • Installing vlucas/phpdotenv (v2.4.0): Downloading (100%)
  • Installing symfony/routing (v3.3.2): Downloading (100%)
  • Installing symfony/process (v3.3.2): Loading from cache
  • Installing symfony/http-foundation (v3.3.2): Downloading (100%)
  • Installing symfony/event-dispatcher (v3.3.2): Downloading (100%)
  • Installing symfony/http-kernel (v3.3.2): Downloading (100%)
  • Installing symfony/finder (v3.3.2): Downloading (100%)
  • Installing swiftmailer/swiftmailer (v5.4.8): Loading from cache
  • Installing paragonie/random_compat (v2.0.10): Downloading (100%)
  • Installing ramsey/uuid (3.6.1): Downloading (100%)
  • Installing symfony/translation (v3.3.2): Downloading (100%)
  • Installing nesbot/carbon (1.22.1): Loading from cache
  • Installing mtdowling/cron-expression (v1.2.0): Downloading (100%)
  • Installing monolog/monolog (1.23.0): Loading from cache
  • Installing league/flysystem (1.0.40): Downloading (100%)
  • Installing erusev/parsedown (1.6.2): Downloading (100%)
  • Installing doctrine/inflector (v1.1.0): Downloading (100%)
  • Installing laravel/framework (v5.4.27): Downloading (100%)
  • Installing laravel/tinker (v1.0.1): Downloading (100%)
  • Installing fzaninotto/faker (v1.6.0): Downloading (100%)
  • Installing hamcrest/hamcrest-php (v1.2.2): Downloading (100%)
  • Installing mockery/mockery (0.9.9): Downloading (100%)
  • Installing symfony/yaml (v3.3.2): Downloading (100%)
  • Installing sebastian/version (2.0.1): Downloading (100%)
  • Installing sebastian/resource-operations (1.0.0): Downloading (100%) - Installing sebastian/recursion-context (2.0.0): Downloading (100%)
  • Installing sebastian/object-enumerator (2.0.1): Downloading (100%)
  • Installing sebastian/global-state (1.1.1): Downloading (100%)
  • Installing sebastian/exporter (2.0.0): Downloading (100%)
  • Installing sebastian/environment (2.0.0): Downloading (100%)
  • Installing sebastian/diff (1.4.3): Downloading (100%)
  • Installing sebastian/comparator (1.2.4): Downloading (100%)
  • Installing doctrine/instantiator (1.0.5): Downloading (100%)
  • Installing phpunit/php-text-template (1.2.1): Downloading (100%)
  • Installing phpunit/phpunit-mock-objects (3.4.3):Downloading (100%) )
  • Installing phpunit/php-timer (1.0.9): Downloading (100%)
  • Installing phpunit/php-file-iterator (1.4.2): Downloading (100%)
  • Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%) - Installing phpunit/php-token-stream (1.4.11): Downloading (100%)
  • Installing phpunit/php-code-coverage (4.0.8): Downloading (100%)
  • Installing webmozart/assert (1.2.0): Downloading (100%)
  • Installing phpdocumentor/reflection-common (1.0): Downloading (100%) - Installing phpdocumentor/type-resolver (0.2.1): Downloading (100%)
  • Installing phpdocumentor/reflection-docblock (3.1.1): Downloading (100%) - Installing phpspec/prophecy (v1.7.0): Downloading (100%)
  • Installing myclabs/deep-copy (1.6.1): Downloading (100%)
  • Installing phpunit/phpunit (5.7.21): Downloading (100%)
    symfony/var-dumper suggests installing ext-symfony_debug () symfony/console suggests installing symfony/filesystem () psy/psysh suggests installing ext-pcntl (Enabling the PCNTL extension makes PsySH a lot happier :)) psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.) psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.) symfony/routing suggests installing doctrine/annotations (For using the annotation loader) symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader) symfony/routing suggests installing symfony/dependency-injection (For loading routes from a service) symfony/routing suggests installing symfony/expression-language (For using expression matching) symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/http-kernel suggests installing symfony/browser-kit () symfony/http-kernel suggests installing symfony/class-loader () symfony/http-kernel suggests installing symfony/config () symfony/http-kernel suggests installing symfony/dependency-injection () paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.) ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter) ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator) ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator) ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).) ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.) ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid) symfony/translation suggests installing symfony/config () monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB) monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server) monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required)) monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server) monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server) monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver) monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib) monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome) monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar) monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server) monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server) league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2) league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3) league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage) league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching) league/flysystem suggests installing league/flysystem-copy (Allows you to use Copy.com storage) league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem) league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files) league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib) league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage) league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter) league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage) laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (~3.0).) laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (~2.5).) laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).) laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (~1.0).) laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (~1.0).) laravel/framework suggests installing nexmo/client (Required to use the Nexmo transport (~1.0).) laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (~3.0).) laravel/framework suggests installing predis/predis (Required to use the redis cache and queue drivers (~1.0).) laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (~2.0).) laravel/framework suggests installing symfony/dom-crawler (Required to use most of the crawler integration testing tools (~3.2).) laravel/framework suggests installing symfony/psr-http-message-bridge (Required to psr7 bridging features (0.2.).) sebastian/global-state suggests installing ext-uopz () phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.1) phpunit/phpunit suggests installing phpunit/php-invoker (~1.1) phpunit/phpunit suggests installing ext-xdebug (*) Writing lock file Generating autoload files

Illuminate\Foundation\ComposerScripts::postUpdate php artisan optimize Generating optimized class loader The compiled services file has been removed. php artisan key:generate Application key [base64:7s6tmOeDvXJXHYjftLhzpzTMyYOqJ57r8RO5ObotkFo=] set successfully. Wilsons-iMac:~ mac$ cd laravel-demo Wilsons-iMac:laravel-demo mac$ subl . -bash: subl: command not found Wilsons-iMac:laravel-demo mac$ laravel-demo -bash: laravel-demo: command not found Wilsons-iMac:laravel-demo mac$ laravel -bash: laravel: command not found Wilsons-iMac:laravel-demo mac$ laravel -v -bash: laravel: command not found Wilsons-iMac:laravel-demo mac$ artisan -bash: artisan: command not found Wilsons-iMac:laravel-demo mac$ php laravel install Could not open input file: laravel Wilsons-iMac:laravel-demo mac$

0

I got all this but as you see no laravel

0

What do you need laravel for at this point? You did install the project - as soon as that is done (you did it using composer in stead of the laravel command, which is perfectly fine), all you need is php command.

In the root of your project, there is a file artisan, which can be executed by php running php artisan

artisan gives you some nice commands that will help you speed up your development process. You're not required to use them though I suggest you do.

Good luck.

0

If you wanna install laravel you must install Laravel globally with composer global require “laravel-installer so you can use Laravel command. If you done install laravel globally then you can install your laravel project with laravel new YourProjectName. Hope this help you bro.

0

Faisal, we already told him, but I believe the compose vendor bin directory is not listed in his $path variable so the OS doesn't find the command. you can install it globally in composer, but if the composer vendor bin is not listed, it won't find it.

0

I did this Wilsons-iMac:~ mac$ composer create-project laravel/laravel test-laravel-5-project dev-develop --prefer-dist

[InvalidArgumentException]
Could not find package laravel/laravel with version dev-develop in a versio
n installable using your PHP version 5.6.30.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>] These are the errors I basically ran the same command faisalamir suggested.

0

Thanks for the reply. I will try running it locally to my project. I am running it in mamp so i just place the artisan file in the directory of my project? Please explain so that i clearly understand. I need it for working with real time communication sockets that work with dashboards.

0

I'm a bit lost as to what you need help with now. Each post you write seems to be asking for input on something entirely different. Could you perhaps try and focus on one problem at the time?

0

I am with denjaland. I am a little lost as well. A few quick thoughts after scanning through the previous posts. It would appear you need a few things:

-> Your composer bin in your path to run laravel commands. On a mac the command (to be put into the terminal) is:

export PATH="$PATH:$HOME/.composer/vendor/bin"

This should be done after you composer global require the laravel installer. Once that is done type laravel into the terminal and hit enter. Options should come up. If they do then go ahead and create a new project. You can do this by typing this into the terminal:

laravel new /path/to/where/you/want/your/project/projectname

so example

laravel new ~/Sites/foobar

However, you already installed laravel so no need to run these commands. I just wanted to give an example of how to create a new laravel application via the laravel command.

-> Artisan File and MAMP. There appears to be some confusion here. To state you are running it in MAMP and not locally is incorrect. MAMP is a one-click solution for Apache, Mysql, PHP, etc. However, with this said these packages are all running locally as if you installed them manually yourself. As for the artisan file. This file is created when the laravel directory is created with a fresh laravel installation (so automatic). To use the artisan file you will have to go into a terminal, cd into the laravel directory and run composer install. Once that is all done you can use the artisan file. To test it you can run:

php artisan key:generate

If you get a response that a gey was generated and what that key is, then you are good to go.

-> Valet. Since you are on a mac, I would highly recommend that you look at valet to replace MAMP. It will be a lot easier to use than MAMP (just my personal opinion). However, it doesn't come with php and mysql. So if you uninstall MAMP, use homebrew to install the latest version of PHP and Mysql (I will state here that once you install mysql via homebrew you may have to start it from the terminal). To learn more about valet go to https://laravel.com/docs/5.4/valet.

-> With all this said, if you want a fresh installation of laravel run these commands in a terminal and you should be good to go (Emphasis on should. A lot of factors involved):

composer global require "laravel/installer"
export PATH="$PATH:$HOME/.composer/vendor/bin"
laravel new project
cd ~/project
composer install
php artisan key:generate

If you are running MAMP and therefore Apache then one more command:

php artisan serve

Once this is done don't close your terminal, just go to a web browser and open http://localhost:8000.You should see your new laravel application up and running.

I hope this helps. In order for the above commands to work you will need to have all the laravel requirements installed. Which are:

  1. PHP >= 5.6.4
  2. OpenSSL PHP Extension
  3. PDO PHP Extension
  4. Mbstring PHP Extension
  5. Tokenizer PHP Extension
  6. XML PHP Extension

So if it all worked, then kickback, open the new laravel directory in your favorite editor, and code on.

Last updated 7 years ago.
0

At this rate, I would recommend you switch from MAMP to something more laravel friendly like Laravel Valet check out the intro video

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Josh Wilson Josh Wilson cao812 Joined 23 Jun 2017

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.