Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

apache locale error? #186

Closed
ghost opened this issue Aug 2, 2015 · 9 comments
Closed

apache locale error? #186

ghost opened this issue Aug 2, 2015 · 9 comments

Comments

@ghost
Copy link

ghost commented Aug 2, 2015

Being totally new to this i followed the installation procedure up to the command vagrant up, vagrant provision does not seem to help.
Up until this error fills my console:

TASK: [geerlingguy.apache | Ensure Apache is installed.] ********************** 
failed: [drupalvm] => (item=apache2,apache2-mpm-prefork,apache2-utils) => {"failed": true, "item": "apache2,apache2-mpm-prefork,apache2-utils"}
stderr: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:",
    LC_ALL = (unset),
    LC_TIME = "de_DE.UTF-8",
    LC_MONETARY = "de_DE.UTF-8",
    LC_CTYPE = "C",
    LC_ADDRESS = "de_DE.UTF-8",
    LC_TELEPHONE = "de_DE.UTF-8",
    LC_NAME = "de_DE.UTF-8",
    LC_MEASUREMENT = "de_DE.UTF-8",
    LC_IDENTIFICATION = "de_DE.UTF-8",
    LC_NUMERIC = "de_DE.UTF-8",
    LC_PAPER = "de_DE.UTF-8",
    LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.12-1+deb.sury.org~trusty+5_amd64.deb (--unpack):
 error setting ownership of `/var/www/html.dpkg-new': Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/apache2_2.4.12-1+deb.sury.org~trusty+5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

stdout: Reading package lists...
Building dependency tree...
Reading state information...
apache2-mpm-prefork is already the newest version.
apache2-utils is already the newest version.
Suggested packages:
  www-browser apache2-doc apache2-suexec-pristine apache2-suexec-custom
The following NEW packages will be installed:
  apache2
0 upgraded, 1 newly installed, 0 to remove and 102 not upgraded.
7 not fully installed or removed.
Need to get 0 B/146 kB of archives.
After this operation, 461 kB of additional disk space will be used.
(Reading database ... 63059 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.12-1+deb.sury.org~trusty+5_amd64.deb ...
Unpacking apache2 (2.4.12-1+deb.sury.org~trusty+5) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...

msg: 'apt-get install 'apache2' 'apache2-mpm-prefork' 'apache2-utils' ' failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = "en_US:",
    LC_ALL = (unset),
    LC_TIME = "de_DE.UTF-8",
    LC_MONETARY = "de_DE.UTF-8",
    LC_CTYPE = "C",
    LC_ADDRESS = "de_DE.UTF-8",
    LC_TELEPHONE = "de_DE.UTF-8",
    LC_NAME = "de_DE.UTF-8",
    LC_MEASUREMENT = "de_DE.UTF-8",
    LC_IDENTIFICATION = "de_DE.UTF-8",
    LC_NUMERIC = "de_DE.UTF-8",
    LC_PAPER = "de_DE.UTF-8",
    LANG = "C"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.12-1+deb.sury.org~trusty+5_amd64.deb (--unpack):
 error setting ownership of `/var/www/html.dpkg-new': Operation not permitted
Errors were encountered while processing:
 /var/cache/apt/archives/apache2_2.4.12-1+deb.sury.org~trusty+5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


FATAL: all hosts have already failed -- aborting

@geerlingguy
Copy link
Owner

It looks like you or your server may be in Germany, judging by the locale error you're getting. Otherwise, I'm not quite sure why that message would be popping up.

A couple things to note / try:

  • The suggestions in this SO answer: http://askubuntu.com/a/144448/88829
  • Have you changed any settings inside config.yml, especially the vagrant_box setting? (What is it currently set to?)

@oxyc
Copy link
Collaborator

oxyc commented Aug 3, 2015

One of our developers ran into the same issue so we opted for running the following command as part of our setup. Maybe it's worth settings up in the provisioning script?

vagrant ssh -c "sudo sed -i 's/^\(AcceptEnv LANG LC_\*\)/# \1/' /etc/ssh/sshd_config"

@timdj
Copy link

timdj commented Aug 4, 2015

I just had the same problem. Solved it here by editing my local /etc/ssh/ssh_config by commenting out the SendEnv LANG LC_
I am sure you could also do this in your ~/.ssh/config


actually:

error setting ownership of `/var/www/html.dpkg-new': Operation not permitted

Is another error. I solved this by adding

mount_options: ['rw', 'vers=3', 'tcp', 'nolock', "no_root_squash", "no_subtree_check"]

to config.yml under vagrant_synced_folders

@geerlingguy
Copy link
Owner

I think these issues may be best worked around with a documented solution; I can't guarantee full support for other languages out of the box, but I would love to document workarounds to make sure everything works for non-english setups!

@oxyc
Copy link
Collaborator

oxyc commented Aug 4, 2015

If we modify sshd_config then the server will simply ignore the users language and use english, I don't think anyone ever has the intention of trying to use their own language on a server/vm.

@geerlingguy
Copy link
Owner

@oxyc - True; that could be a good/quick fix, and if I start getting any requests to make that configurable, that could be done later.

oxyc added a commit to oxyc/drupal-vm that referenced this issue Aug 8, 2015
@lmeurs
Copy link

lmeurs commented Aug 13, 2015

@oxyc: Thanks for your commit!

@lmeurs
Copy link

lmeurs commented Aug 24, 2015

Note: The Drupal 7 branch has not been updated (yet).

@geerlingguy
Copy link
Owner

@lmeurs - I've updated the D7 branch. Sorry about that!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants