-
Hi,
I have noticed that Composer comes pre-installed with the Cloudron LAMP stack. If I change into a terminal, I can use it by executing "composer". However, if I run the following command:
root@5585a070-9420-4f84-bd98-5198b471ffb4:/app/data/public# composer require drush/drush Cannot create cache directory /root/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache Cannot create cache directory /root/.composer/cache/files/, or directory is not writable. Proceeding without cache Do not run Composer as root/super user! See https://I see that Composer is not able to create its cache. Also it gets killed, when I try to require a package:
root@5585a070-9420-4f84-bd98-5198b471ffb4:/app/data/public# composer require drush/drush Cannot create cache directory /root/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache Cannot create cache directory /root/.composer/cache/files/, or directory is not writable. Proceeding without cache Do not run Composer as root/super user! See https://getcomposer.org/root for details Using version ^9.5 for drush/drush ./composer.json has been updated Cannot create cache directory /root/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache Cannot create cache directory /root/.composer/cache/files/, or directory is not writable. Proceeding without cache Loading composer repositories with package information Updating dependencies (including require-dev) Killed root@5585a070-9420-4f84-bd98-5198b471ffb4:/app/data/public#What am I doing wrong? Is there an error on your end? Could not find any info about Composer usage. I need Composer for my PHP app.
Kind regards
Peter -
The
Killedat the end is because composer ran out of memory. By default, the package only has 256MB memory, increasing it should fix the problem.As for running composer as root, the packaging is to blame. I am looking into fixing this.
-
For reference, the killed issue is also documented here - https://github.com/composer/composer/issues/1815
-
@jepster We have pushed an update that should make it simpler now. Also updated the docs - https://cloudron.io/documentation/apps/lamp/#running-composer
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login