I'm trying to install dependencies with composer in JetBrains, but I keep getting the following error when I try to add a dependency...
C:\wamp\bin\php\php5.3.13\php.exe
C:\wamp\www\composer.phar> require aws/aws-sdk-php:2.6.0 -n --no-progress
Failed to install
Related
I was trying to install Magento 2 on MacOS 10.15 using https://alpineinc.com/2020/05/install-magento-2-locally-on-a-mac/.
I use the command:
php composer.phar create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2 --ignore-platform-reqs
but I receive: Failed to set PHP CodeSniffer installed_paths Config.
I tried with php composer.phar global require "squizlabs/php_codesniffer=* and brew install php-code-sniffer, but I get the same error.
When I use the command:
git add composer.lock
inside the folder of my project I get the message:
fatal: pathspec 'composer.lock' did not match any files
How can I fix this problem?
All I needed to do was install the xml from my php version.
In my case, my version is 7.1, so I did:
sudo apt-get install php7.1-xml
So I used the commands:
composer install
composer update
And finally I was able to add the composer.lock command:
git add composer.lock
I have done setup for mongodb on my system with Yii2 basic.
I have also installed the extension for mongodb (yii2-mongodb) inside a directory /vendor/yiisoft and checked for the permissions.
Now I am testing the connection with a controller and model but I am getting the following error.
PHP Fatal Error – yii\base\ErrorException Class
'yii\mongodb\ActiveRecord' not found
Is there anything that needs to be installed?
Have you install yii2/mongodb by composer ^^?
composer require --prefer-dist yiisoft/yii2-mongodb
Or your try follow this official Yii2 document step by step maybe can help you up :)!
In this case I tried following command before updating composer to fulfill the packages that need to update the composer
sudo apt-get update
sudo apt-get install php7.0-xml
most likely you are missing mbstring too . If you get the error install this package as well.
sudo apt-get install php-mbstring
then run
composer require --prefer-dist yiisoft/yii2-mongodb
composer update
Will work!!!
I've been trying to install laravel on Ubuntu 14.04. I finished all the steps, but when try to
laravel new mySite
the following message is deployed:
Crafting application...
sh: 1: composer: not found
Application ready! Build something amazing.
It's looks like some trouble with composer, but I don't know why. Composer seems to work, so, what is wrong? Thank you!
I got the same error.
I fixed it with simple symlink.
locate it. Run: # whereis composer
composer: /usr/local/bin/composer.phar
then create link: # sudo ln -s /usr/local/bin/composer.phar /usr/local/bin/composer
Thats it. All works.
If you run composer on shell, does it run? otherwise run:
sudo apt-get install curl php5-cli git
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Then try again, maybe you could try the composer installation syntax:
composer create-project --prefer-dist laravel/laravel blog
To be sure composer is updated to the latest version and nothing is in cache run:
composer self-update
composer clear-cache
I still can't use laravel new, but I found what was happening with composer.
Laravel 5.3 needs php5.6 or higher, otherwise will run an older laravel version. I upgrade to php5.6 with this steps: https://www.dev-metal.com/install-setup-php-5-6-ubuntu-14-04-lts/
then run
composer create-project laravel/laravel ProjectName
and it's done!
Trying to install Symfony2 via composer failer.
It'seems to be a access right issue :
cmd :
composer create-project symfony/framework-standard-edition /Users/anthonydiniro/WWW/win4u2.com
result:
Installing symfony/framework-standard-edition (v2.5.0)
- Installing symfony/framework-standard-edition (v2.5.0)
Downloading: 100%
[ErrorException]
copy(/Users/anthonydiniro/.composer/cache/files/symfony/framework-standard-edition/96cf36b581c9cd4827fe8c973080a6db085a49b6.zip): failed to open stream: P
ermission denied
Thanks for help
As always, the first good thing to try if you have encountered an error is to run
php composer.phar self-update
That will ensure the latest composer binaries. Then, run your installation again ;)
Try what jperovic said first!
otherwise try sudo composer create-project symfony/framework-standard-edition /Users/anthonydiniro/WWW/win4u2.com
If that doesn't work try sudo chmod 777 -R /Users/anthonydiniro/.composer/cache/