PHP 7 upgrade error : add-apt-repository is broken with non-UTF-8 locales

June 20, 2016 6.2k views
PHP Linux Commands LEMP Ubuntu


So, I'm trying to upgrade on Ubuntu 14.04 / PHP 5.5 to PHP 7 by following this tutorial : .

In this tutorial there's a workaround for this error :

WARNING: add-apt-repository is broken with non-UTF-8 locales, see for workaround:

There's a workaround in the tutorial itself as such :

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php

However, when doing this, nothing changes. I get the same error ... anyone know how to solve it ?


4 Answers

Try this LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php

  • Thanks for your reply ... unfortunately I'm still getting the same message ... It doesn't make a difference ...

I would also like to know how to solve this problem, may I ask you to solve this problem?

I just use the -y to accept. I know not really a fix but i know my locale environment is set to C.UTF-8

LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php

Have another answer? Share your knowledge.