Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker + apt-add-repository: 'ascii' codec can't decode byte

After starting a fresh docker Ubuntu environment,

docker run -ti ubuntu:17.04

I'm trying to add a PPA via

apt-get update
apt-get install -y software-properties-common
apt-add-repository -y ppa:nschloe/vtk7-nightly

However, this fails with

gpg: key ECD154D280FEB8AC: public key "Launchpad PPA for Nico Schl�mer" imported
gpg: Total number processed: 1
gpg:               imported: 1
'ascii' codec can't decode byte 0xc3 in position 229: ordinal not in range(128)

Looks like the dreaded ö umlaut strikes again.

How to fix this?

like image 280
Nico Schlömer Avatar asked Apr 14 '17 10:04

Nico Schlömer


1 Answers

Just set a UTF-8 aware locale, before you invoke the apt-add-repository:

export LANG=C.UTF-8

and it will work just fine.

like image 119
zeppelin Avatar answered Sep 16 '22 14:09

zeppelin