* Update: the issue could be resolved by reducing the Directory depth *
I've tried to install the latest Symfony version (2.1.6, 2.1.5, 2.1.x-dev) via the recommended way using composer but it always fails with the same error:
C:\Users\made\eclipse-workspace\template-compiler\template-compiler\lib\server\symfony\vendor\doctrine\doctrine-bundle\Doctrine\Bundle\DoctrineBundle\b05c336283dc24eb535a50f89ce9d91c.0 - Das Handle ist ung¬tig.
Searching gave me no further clues until now and i would like to avoid having to create everything from scratch. I tried the self-udpate feature of composer and all of the mentioned versions above but the installation still fails. I'm using the git Bash on Win7 with PHP 5.3.8 but I also tried PHP 5.4.10
Complete Output:
C:\Users\made\eclipse-workspace\template-compiler\template-compiler\lib\server>C:\Users\made\AppData\Roaming\Composer\bin\composer
create-project symfony/framework-standard-edition symfony 2.1.6
Installing symfony/framework-standard-edition (v2.1.6)
- Installing symfony/framework-standard-edition (v2.1.6)
Loading from cache
Created project in symfony
Loading composer repositories with package information
Installing dependencies from lock file
- Installing doctrine/common (2.3.0)
Loading from cache
- Installing doctrine/dbal (2.3.1)
Loading from cache
- Installing twig/twig (v1.11.1)
Loading from cache
- Installing symfony/symfony (v2.1.6)
Loading from cache
- Installing doctrine/doctrine-bundle (v1.0.0)
Downloading: 100%
C:\Users\made\eclipse-workspace\template-compiler\template-compiler\lib\server\symfony\vendor\doctrine\doctrine-bundle\Doctrine\Bu
ndle\DoctrineBundle\5338efeb67b3e71765a5179fbadb1633.0 - Das Handle ist ungültig.
[ErrorException]
ZipArchive::extractTo(C:\Users\made\eclipse-workspace\template-compiler\template-compiler\lib\server\symfony\vendor/doctrine/
doctrine-bundle/Doctrine/Bundle/DoctrineBundle/DoctrineBundle-1.0.0\Tests\DependencyInjection\Fixtures\Bundles\Vendor\Annotat
ionsBundle/AnnotationsBundle.php): failed to open stream: Invalid argument
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-custom-installers]
[--no-scripts] [--no-progress] [--keep-vcs] package [directory] [version]
C:\Users\made\eclipse-workspace\template-compiler\template-compiler\lib\server>
the issue could be resolved by reducing the Directory depth
PS: now i have the rep score to solve this...
Related
Normally , it run across issue Do not run Composer as root/super user! See https://getcomposer.org/root for details when to execute sudo composer require somePackage.
Here is my record for installing swiftmailer.
Firstly to execute composer require somePackage without sudo.
debian9#machine:~$ composer require "swiftmailer/swiftmailer:^6.0"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
/home/debian9/vendor/doctrine/lexer does not exist and could not be created
.
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] [<packages>]...
Let's try with sudo.
debian9#machine:~$ sudo composer require "swiftmailer/swiftmailer:^6.0"
Do not run Composer as root/super user! See https://getcomposer.org/root for details
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing doctrine/lexer (v1.0.1)
Downloading: 100%
- Installing egulias/email-validator (2.1.6)
Downloading: 100%
- Installing swiftmailer/swiftmailer (v6.1.3)
Downloading: 100%
egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
swiftmailer/swiftmailer suggests installing ext-intl (Needed to support internationalized email addresses)
swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
Writing lock file
Generating autoload files
I am confused that without sudo ,swiftmailer can't be installed,with sudo ,an error occur Do not run Composer as root/super user!.
You've probably run Composer with sudo in the past. This has left some of the directories under vendor/ owned by root, preventing you from using Composer normally.
Change ownership on the entire vendor directory to your shell user, or delete the directory entirely. (You will need to do this as root.) Once you have done so, you should be able to use Composer normally.
I'm trying to install laravel 5.7 by using this command
> composer create-project --prefer-dist laravel/laravel new_project dev-develop
But it's reflecting following error, also i disabled antivirus and firewall.
Installing laravel/laravel (dev-develop
b0651d2467f1428eadc505e1b3b4f5678611927c)
- Installing laravel/laravel (dev-develop develop): Loading from cache Created project in new_project
#php -r "file_exists('.env') || copy('.env.example', '.env');" Loading composer repositories with package information Updating
dependencies (including require-dev) Package operations: 71 installs,
0 updates, 0 removals
- Installing vlucas/phpdotenv (v2.5.1): Downloading (failed) Downloading (failed) Downloading (failed) Failed to download
vlucas/phpdotenv from dist: The
"https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e"
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 vlucas/phpdotenv (v2.5.1): Cloning 8abb4f9aa8
[RuntimeException] Failed to clone
https://github.com/vlucas/phpdotenv.git via https,ssh protocols,
aborting.
- https,ssh://github.com/vlucas/phpdotenv.git
Cloning into 'D:\xamppro\htdocs\neologicx.com\new_project\vendor\vlucas\phpdotenv'...
fatal: I don't handle protocol 'https,ssh'
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] [--] [] [] []
OpenSSL Installed
and enabled
Okay, my problem resolved by removing '%temp%' files from windows.
After that i got content-length mismatch problem resolved from this Composer Content-Length Mismatch
And then again i tried this "composer create-project laravel/laravel laravelproject1" it worked.
Thanks Alot everyone.
composer global require "laravel/installer"
--
laravel new myProject
Run these commands in order and you should be fine.
If you prefer to use the composer create project command, then run this:
composer create-project --prefer-dist laravel/laravel blog
try composer clear-cache then composer self-update
Please try this.
install laravel 5.7:
composer create-project laravel/laravel laravelproject1
I was having a bit of trouble getting PHPStorm to work with laravel/composer.
Upon opening PHPStorm, I created a new Composer Project: http://puu.sh/e4y1H/6fb97cf976.png
After which, I filled in necessary the details: http://puu.sh/e4y6Z/55bc60e7fc.png
After continuing, I run into the following error:
php /Users/mdobrenko/Sites/test/composer.phar create-project laravel/laravel
/Users/mdobrenko/Sites/test/composer -n --no-progress
Installing laravel/laravel (v4.2.11)
- Installing laravel/laravel (v4.2.11)
Loading from cache
Created project in /Users/mdobrenko/Sites/test/composer
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing symfony/translation (v2.5.8)
Loading from cache
- Installing symfony/security-core (v2.5.8)
Loading from cache
- Installing symfony/routing (v2.5.8)
Loading from cache
- Installing symfony/process (v2.5.8)
Loading from cache
- Installing psr/log (1.0.0)
Loading from cache
- Installing symfony/debug (v2.5.8)
Downloading: connection... Downloading: 0% Downloading: 10% Downloading: 35% Downloading: 45% Downloading: 70% Downloading: 80% Downloading: 90% Downloading: 100%
- Installing symfony/http-foundation (v2.5.8)
[ErrorException]
touch(): Utime failed: Permission denied
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] [--ignore-platform-reqs] [package] [directory] [version]
The 'Sites' directory that I store my development projects in, which is where this project lives, has the following permissions set:
drwxrwxrwx 11 mdobrenko staff 374 Jan 4 13:40 Sites
I noticed that most of my php artisan commands require the use of 'sudo'. Creating a new laravel project via the command:
composer create-project laravel/laravel your-project-name --prefer-dist
I have a feeling permissions may be the issue, but I am unsure of how to fix this. Any help would be appreciated!
This link should help. Try clearing the composer cache, re-installing composer, Chown the Sites folder to the same user as the apache server uses
To clear the composer cache, open a terminal and cd into your project folder: sudo composer clear-cache (sudo may not be required here)
Changing permissions: chown -R $(whoami): . this sets the owner of all files and sudirectories to the current user. giving you permission to access the files.
I ran
composer self-update
then I added this in my composer.json
"iron-io/iron_mq": "*"
the ran
composer update
and
composer install
But now no matter what I do I'm getting this error
C:\Project>composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Nothing to install or update
Generating autoload files
Fatal error: Class 'IronCore' not found in C:\Project\vendor\iron-io\iron_mq\IronMQ.class.php on line 118
Script php artisan optimize handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output:
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
Did something get corrupted what's going on? I tried to remove the line in composer but the error is stuck there now!
Uh... No idea what just happened.
Try to:
declare exact version: (latest for iron_mq: 1.4.5)
add line with iron_core dependency (should work without it though):
"iron-io/iron_core": "0.1.5"
EDIT:
Please test latest iron_mq version (1.4.6)
I cloned a git project, then run composer update command, I got this error message on composer:
- Installing symfony/symfony (v2.2.4)
Downloading: 100%
[UnexpectedValueException]
'E:\Sites\myapp-api\vendor/symfony/symfony/268ac81f41a8a73a56ef570d9e7980
27.4' is not a zip archive.
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
[--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [
-o|--optimize-autoloader] [packages1] ... [packagesN]
I tried to delete composer.lock and run composer update command again, still return the same error.
I also try to run composer update symfony/symfony, and with --prefer-dist but still return the same error message 'is not a zip archive'.
How to solve this problem?
I try and try again, and now there are 3 ites of downloading symfony/symfony
- Installing symfony/symfony (v2.2.4)
Downloading: 100%
- Installing symfony/symfony (v2.2.4)
Downloading: 100%
- Installing symfony/symfony (v2.2.4)
Downloading: 100%
[UnexpectedValueException]
'E:\Sites\trainme-api\vendor/symfony/symfony/698bb2e6e680e6c886eb5c70f5d93e
97.4' is not a zip archive.
I had silimar issue. Clearing composer cache helped.
Look here: https://github.com/composer/composer/issues/1242
If You are using linux composer cache should be in: ~/.composer/
You can clear it with backup with this command:
mv ~/.composer/cache ~/.composer/cache.bak
Update
Check cache-dir param in your composer.json
http://getcomposer.org/doc/04-schema.md#config
cache-dir: Defaults to $home/cache on unix systems and C:\Users\\AppData\Local\Composer on Windows. Stores all the caches used by composer. See also COMPOSER_HOME.
UPDATE:
You can find cache dir with command (thanks to #Permana):
php composer.phar config cache-dir