0

I am trying to install Nginx on my Ubuntu 16 on Godaddy but I am getting locale setting errors.

I have a full MongoDB Express React Node project with AXIOS. I deployed this project before I added the REST api with REDUX. The project didn't work correctly because nginx.conf was wrong(possibly could've been some where else but the error was post method (405)).

So I wanted to re-deploy the project since I found a article for deploying MERN project correctly.

I just wanted a fresh start....

This is the error i get when i try to install nginx in ubuntu with this command:

sudo apt-get install -y build-essential openssl libssl-dev pkg-config

I tried other answers that I got from this link, didnt work. Like typing bunch commands into ubuntu.

https://askubuntu.com/questions/1015398/cant-set-locales-ubuntu-16-04

etc....

This the error i get,

perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 36967 files and directories currently installed.)
Removing nginx-common (1.10.3-0ubuntu0.16.04.3) ...
Purging configuration files for nginx-common (1.10.3-0ubuntu0.16.04.3) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up postfix (3.1.0-3ubuntu0.3) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory

But if i continue deploying regardless of above error, I get this:

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nginx, action "start" failed.
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2019-01-08 21:14:31 MST; 23ms ago
  Process: 18459 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)

Jan 08 21:14:31 s166-62-124-233.secureserver.net nginx[18459]: nginx: [emerg] socket() [::]:80 failed ...l)
Jan 08 21:14:31 s166-62-124-233.secureserver.net nginx[18459]: nginx: configuration file /etc/nginx/ng...ed
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package nginx-core (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-core (>= 1.10.3-0ubuntu0.16.04.3) | nginx-full (>= 1.10.3-0ubuntu0.16.04.3) | nginx-light (>= 1.10.3-0ubuntu0.16.04.3) | nginx-extras (>= 1.10.3-0ubuntu0.16.04.3); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
 nginx depends on nginx-core (<< 1.10.3-0ubuntu0.16.04.3.1~) | nginx-full (<< 1.10.3-0ubuntu0.16.04.3.1~) | nginx-light (<< 1.10.3-0ubuntu0.16.04.3.1~) | nginx-extras (<< 1.10.3-0ubuntu0.16.04.3.1~); however:
  Package nginx-core is not configured yet.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.

dpkg: error processing package nginx (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu19) ...
Errors were encountered while processing:
 nginx-core
 nginx
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ 

And the website has "Apache2 Ubuntu Default Page"

This is the screenshot on the website "Apache2 Ubuntu Default Page"

1 Answer 1

0

Have you tried disabling Apache before running nginx?

I'm admittedly a noob at server administration, but when I've tried installing nginx with apache running I've had similar issues.

Could explain the Apache default page -if your expecting an nginx default page anyway.

Try stopping apache and attempting to install nginx again

sudo systemctl stop apache2

If that helps, you may need to disable apache so it doesn't run again on its own, if that's what you intend.

See this thread if you want to disable Apache all together: How to disable apache2 server from auto starting on boot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .