I'm trying to install laravel in opt/lampp/htdocs directory and get this error:
$ composer create-project --prefer-dist laravel/laravel blog
Installing laravel/laravel (v5.3.16)
[ErrorException]
mkdir(): Permission denied
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>]
I'm using Ubuntu 16.04
Can anyone help?
you need to make it withsudo
sudo composer create-project --prefer-dist laravel/laravel blog
Related
I already have Composer and XAMPP installed.
But when I try to use composer create-project laravel/laravel example-app command to create a new project by using Composer directly I throws some errors
C:\Users\HP>composer create-project laravel/laravel example-app
Creating a "laravel/laravel" project at "./example-app"
Installing laravel/laravel (v9.1.10)
- Installing laravel/laravel (v9.1.10): Extracting archive
Created project in C:\Users\HP\example-app
In CreateProjectCommand.php line 497:
chdir(): No such file or directory (errno 2)
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [<package> [<directory> [<version>]]]
C:\Users\HP>
I have tried:
Reinstalling Composer
Changing folder where I want to create my project
Using the composer global require laravel/installer
I'm using Composer version 2.3.7 and PHP Version 8.1.6. Im trying to install laravel 9 and my XAMPP is version 3.3.0
Did you try this ?
composer self-update
Same issue
Or you should change your installation directory.
cd desktop
I have created a new repository on GitHub. I have used GitHub Desktop to commit all files. All is done. But I can't create a new project with Composer.
Here is my repository:
https://github.com/xttrust/CodeIgniter-HMVC-EXTRA
I have tried to create a new project like this:
composer create-project xttrust/CodeIgniter-HMVC-EXTRA
I get this error in GitBash:
[InvalidArgumentException]
Could not find package xttrust/codeigniter-hmvc-extra with stability stable.
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] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
As Chris mentioned in a comment:
Have you submitted it to Packagist?
I had to merge it with Packagist, and it then worked.
No issue as the error is correct. Try searching Packagist. You will need to submit your github repo https://github.com/xttrust/CodeIgniter-HMVC-EXTRA
Installing laravel/laravel (v5.7.13)
- Installing laravel/laravel (v5.7.13): Downloading (failed)
Downloading (failed)
Downloading (failed) Failed to download laravel/laravel from dist: The "https://api.github.com/repos/laravel/laravel/zipball/c09519f547ae7a97eb26433f159cd81b8753e666" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Now trying to download from source
- Installing laravel/laravel (v5.7.13): Cloning c09519f547
[RuntimeException]
Failed to clone https://github.com/laravel/laravel.git, git was not found, check that it is installed and in your P
ATH env.
'git' is not recognized as an internal or external command,
operable program or batch file.
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] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []
i have installed composer using composer-setup.exe
then after i am trying to install laravel from cmd using composer.
my cmd command are like:
"F:\Websites>composer create-project laravel/laravel l5"
and it gives me error like :
[ErrorException]
chmod(): No such file or directory
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] [--] [] [] []
I am using create-project command with composer
i think you are missing something there..
try this and you are good to go..
composer create-project --prefer-dist laravel/laravel yourDirectory
its from official documentation
I was following a tutorial on Lynda.com, and I am completely new to the composer/laravel scene. The tutorial told me to install the MCrypt libarary, which I did successfully from this package:
topicdesk.com/downloads/mcrypt/mcrypt-download
Composer seems to be successfully installed/running.
I then went ahead and opened terminal, and put in the following command:
composer create-project laravel/laravel first_app --prefer-dist
Which resulted in the following error:
Script php artisan clear-compiled handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output:
create-project [-s|--stability="..."] [--prefer-source]
[--prefer-dist] [--repository-url="..."]
[--dev] [--no-dev] [--no-plugins]
[--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs]
[--no-install] [package] [directory] [version]
Any ideas on what the issue may be? After looking around on the forums, it seems to me that it is a very case specific issue. Where do I begin in finding what may be preventing it from working correctly?