I'm trying to install CGIProxy on my Ubuntu server and according to the instructions I have to:

  1. Copy the file nph-proxy.cgi onto your Web server somewhere, but not at the top Web directory, or else it will be easily discovered.

  2. Change the file's permissions to be executable. On Unix and Mac, you can do this with the command

    chmod +x nph-proxy.cgi

    there are other ways.

  3. In the directory where you copied nph-proxy.cgi, run the command

    ./nph-proxy.cgi install-modules

    (or in Windows, perl nph-proxy.cgi install-modules). This installs the optional Perl modules to e.g. let you visit secure sites. If you can't run this as root/administrator, it will still work, but see the instructions displayed at the end after all the scrolling text (which you can ignore). If it asks you any questions, you can just hit Ret.

I'm at step 3 but when I run the command

./nph-proxy.cgi install-modules

I get the following:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_US:en",
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").  

I'm still pretty new to linux so I'm not sure what the issue is here, I've tried to run the command with sudo but still the same error.

Any help is greatly appreciated, thanks!


Don't worry about that, this is just a warning from Perl. You should be fine with the C locale.

Or, solve it by running

sudo apt-get install locales
sudo dpkg-reconfigure locales

It should generate the necessary locales.

  • But is the script still successfully installed or did it go through at all? Because I see a whole page of code instead of the normal GUI window when I access that script via a browser – jc.yin Jul 11 '13 at 9:02
  • I tried locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE=UTF-8 LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= and it seems correct.... – jc.yin Jul 11 '13 at 9:04

Looks like the locale variables are set by SSH. If so here is the good answer: https://askubuntu.com/a/144448/136473

My choice is to comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file.

  • Please do not post just a pointer to another question. If the questions are so similar that the same answer works on each, then the later of the two is likely a duplicate and should be flagged as such. – guntbert Jun 16 '17 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.