I am try to install barcode package in my cpanel laravel project.But every time it gets killed.
command:
[......#host public_html]$ composer require milon/barcode
after few moment:
Using version ^7.0 for milon/barcode
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "http://repo.packagist.org/p/symfony/polyfill-iconv%24535e139d88ce6708c9d8bf795da669c3fe46467f4bc7dc900e2e65a8d77b56ae.json" file could not be downloaded: failed to open stream: Network is unreachable
http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Killed
it also happening for all the packages I want to install like:pdf or others.Updated my composer.still not working.
It happens for a lack of memory of your server. You can install the package in your local machine then replace your server composer.lock file with the local's composer.lock file Then go to the terminal and run composer update.
Related
The "http://repo.packagist.org/p/guzzlehttp/psr7%24a1ea6550f2764cbd6a29394f3c79fe41efb9cfc4bc22558b00a4a0e5573d63c1.json" file could not be downloaded: failed to open stream: HTTP request failed!
http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Is this on composer install within a project or up creation with something like laravel new laravel.local?
If it's in a current project, try deleting the composer.lock file and deleting the /vendor folder, then running composer clearcache, then composer dump-autoload, and then finally reinstall all the vendor packages with composer install
I'm running Ubuntu 18.04.4 LTS (Bionic Beaver).
I have installed Composer, Laravel, among other things on this server. I'm trying to run:
composer global require laravel/valet
It attempts to run, and outputs:
Changed current directory to /home/myUser/.config/composer Using version
^2.9 for laravel/valet ./composer.json has been updated Loading
composer repositories with package information Updating dependencies
(including require-dev) Nothing to install or update Generating
optimized autoload files
In ClassMapGenerator.php line 69:
Could not scan for classes inside "database/seeds" which does not
appear to be a file nor a folder
Where is/should this folder be, and why wouldn't it already be there anyway?
Laravel Valet is a MacOS utility, there are linux ports, such as this one, but it won't work on Ubuntu as it uses Homebrew under the hood, a package manager for MacOS.
I am trying to run composer update or if I tried to install any package for my site it hangs saying this
Loading composer repositories with package information
Updating dependencies (including require-dev)
But If I try composer install it is working with
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
- Installing psr/log (1.1.2): Loading from cache
- Installing symfony/polyfill-ctype (v1.13.1): Loading from cache
- Installing phpoption/phpoption (1.6.0): Loading from cache
......
I am using Laravel Homestead with vagrant and virtualbox
Whats the problem and How to solve it
composer is still hanging try to clear composer cache:
composer clear-cache
If these steps does not repair your composer then it's possible that the system does not have enough RAM memory available
Increase memory https://stackoverflow.com/a/44533437/3518053 or
Generate swap file .Try creating a swap file to provide more memory
I had this issue a few times. Composer install is mostly working becuase it doesn't have to check every package for updates. To fix this a few options you can try :
update composer to latest
remove the complete vendor folder and run composer update
increase ram memory (most times it fails because of this). Check out this Q Composer update memory limit
Check you composer.json file for unnecessary package depths, some packages require other packages wich can overload your cpu and ram.
Try composer update --prefer-dist
I am using Laravel Valet to creating laravel application because suddenly composer "create-project --prefer-dist laravel/laravel blog" not working.
require command not working.
so I install the valet
The composer is successfully installed on my device Globally. i Follow stap from laravel valet doc to setup composer.
Problem is after composer require command it takes minimum 5min to load
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
and nothing happened I wait 30min and not error or no output
check images composer installed
again wait for 1hour no output and no error
one more example
now how to fix it
This looks like a network error. You should check your network settings, double check if you have access. (I think you have because you posted this question)
There could also be something wrong with the installed composer repositories. If one of those is unavailable it will take forever to load all repositories/search for a repository. You can check which repositories are used with the following command:
composer -g config repositories
composer config repositories
It solved. It was my broadband problem. The connection was alright but it was not able to download package. now it's working.
I am trying to install zendframework on my windows 7. I have installed wamp and have put ZendFramework-2.2.1_2 folder into wamp/bin/php/php5../ and added path to library in include_path variable of php. now i am trying to use composer to install the project but it is saying that
c:\wamp\www\my_app>cd ZendSkeletonApplication
c:\wamp\www\my_app\ZendSkeletonApplication>php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing zendframework/zendframework (2.2.1)
Downloading: 100%
[UnexpectedValueException]
'C:\wamp\www\my_app\ZendSkeletonApplication\vendor/zendframework/zendframew
ork/bf2ea22d074d758da4b97aae94293c3a.1' is not a zip archive.
The corrupted cache files are the problem.
The solution is to delete the cache files and execute the command again. The cache files are in the composer home directory:
on windows:
C:\Users[user]>\AppData\Roaming\Composer
or
C:\Users[user]\AppData\Local\Composer (I found composer cache files here)
on *nix:
/home/[user]/.composer
on OSX:
/Users/[user]/.composer