Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Laravel 4 Basics Getting Started with Laravel Installing Laravel

Jenny Swift
Jenny Swift
21,999 Points

I'm told to update composer and then I get an error.

So when I run the 'composer' command in my terminal, I'm told:

Warning: This development build of composer is over 30 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version.

So I ran this command:

vagrant@homestead:~/Sites$ /usr/local/bin/composer self-update

And then got this:

[Composer\Downloader\FilesystemException] Filesystem exception: Composer update failed: the "/usr/local/bin/composer" file could not be written

self-update [-r|--rollback] [--clean-backups] [version]

What should I do please?

2 Answers

Chris Shaw
Chris Shaw
26,650 Points

Hi Jenny,

Simply run the command as sudo and composer will update without any issues.

sudo /usr/local/bin/composer self-update

Hope that helps.

Jenny Swift
Jenny Swift
21,999 Points

Excellent, that worked. Thanks Chris!

Nathan Williams
seal-mask
.a{fill-rule:evenodd;}techdegree
Nathan Williams
Python Web Development Techdegree Student 6,851 Points

Hi Jenny,

That's just a warning, so you should feel free to ignore it; all the composer commands you need to run for the course should work just fine.

Even so, thanks for the heads up on the warning message, we'll get that updated and ship out an update sometime soon.

Cheers!

Nathan