Composer: file_put_contents(./composer.json): failed to open stream: Permission denied

前端 未结 8 881
一生所求
一生所求 2020-12-12 14:49

I\'m trying to install Prestissimo to an Ubuntu 16.04 server, but that leads to an error:

$ composer global require \"hirak/prestissimo:^0.3\"
Changed curren         


        
相关标签:
8条回答
  • 2020-12-12 15:31

    This might be super edge case, but if you are using Travis CI and taking advantage of caching, you might want to clear all cache and retry.

    Fixed my issue when I was going from sudo to non sudo builds.

    0 讨论(0)
  • 2020-12-12 15:32

    In my case, .composer was owned by root, so I did sudo rm -fr .composer and then my global require worked.

    Be warned! You don't wanna use that command if you are not sure what you are doing.

    0 讨论(0)
提交回复
热议问题