Installing Nginx old version 1.4.6 issue

When installing nginx, it requires dependent packages like nginx-core, nginx-full, nginx-nasxi, etc. After I install nginx-core and nginx-common, the remaining packagess refuse to install due to conflicts with nginx-core. The ‘main’ nginx_1.4.6 package is also ‘forget’ about dependencies on nginx-full, nginx-nasxi, etc. I have the same versions of all nginx packages.

Let me show you what I mean.

root@test-udprf:/home/a.bolshedvorskii# dpkg -i nginx_1.4.6-1ubuntu3_all.deb
Selecting previously unselected package nginx.
(Reading database ... 37454 files and directories currently installed.)
Preparing to unpack nginx_1.4.6-1ubuntu3_all.deb ...
Unpacking nginx (1.4.6-1ubuntu3) ...
dpkg: dependency problems prevent configuration of nginx:
 nginx depends on nginx-core (>= 1.4.6-1ubuntu3) | nginx-full (>= 1.4.6-1ubuntu3) | nginx-light (>= 1.4.6-1ubuntu3) | nginx-extras (>= 1.4.6-1ubuntu3) | nginx-naxsi (>= 1.4.6-1ubuntu3); however:
  Package nginx-core is not installed.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
  Package nginx-naxsi is not installed.
 nginx depends on nginx-core (<< 1.4.6-1ubuntu3.1~) | nginx-full (<< 1.4.6-1ubuntu3.1~) | nginx-light (<< 1.4.6-1ubuntu3.1~) | nginx-extras (<< 1.4.6-1ubuntu3.1~) | nginx-naxsi (<< 1.4.6-1ubuntu3.1~); however:
  Package nginx-core is not installed.
  Package nginx-full is not installed.
  Package nginx-light is not installed.
  Package nginx-extras is not installed.
  Package nginx-naxsi is not installed.

dpkg: error processing package nginx (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 nginx
root@test-udprf:/home/a.bolshedvorskii# dpkg -i nginx-core_1.4.6-1ubuntu3_amd64.deb
Selecting previously unselected package nginx-core.
(Reading database ... 37459 files and directories currently installed.)
Preparing to unpack nginx-core_1.4.6-1ubuntu3_amd64.deb ...
Unpacking nginx-core (1.4.6-1ubuntu3) ...
dpkg: dependency problems prevent configuration of nginx-core:
 nginx-core depends on nginx-common (= 1.4.6-1ubuntu3); however:
  Package nginx-common is not installed.

dpkg: error processing package nginx-core (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 nginx-core
root@test-udprf:/home/a.bolshedvorskii# dpkg -i nginx-common_1.4.6-1ubuntu3_all.deb
Selecting previously unselected package nginx-common.
(Reading database ... 37465 files and directories currently installed.)
Preparing to unpack nginx-common_1.4.6-1ubuntu3_all.deb ...
Unpacking nginx-common (1.4.6-1ubuntu3) ...
Setting up nginx-common (1.4.6-1ubuntu3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /lib/systemd/system/nginx.service.
insserv: warning: script 'cgroups' missing LSB tags
insserv: Default-Start undefined, assuming empty start runlevel(s) for script `cgroups'
insserv: Default-Stop  undefined, assuming empty stop runlevel(s) for script `cgroups'
Processing triggers for man-db (2.9.4-2) ...
root@test-udprf:/home/a.bolshedvorskii# dpkg -i nginx-core_1.4.6-1ubuntu3_amd64.deb
(Reading database ... 37499 files and directories currently installed.)
Preparing to unpack nginx-core_1.4.6-1ubuntu3_amd64.deb ...
Unpacking nginx-core (1.4.6-1ubuntu3) over (1.4.6-1ubuntu3) ...
Setting up nginx-core (1.4.6-1ubuntu3) ...
root@test-udprf:/home/a.bolshedvorskii# dpkg -i nginx-full_1.4.6-1ubuntu3_amd64.deb
dpkg: regarding nginx-full_1.4.6-1ubuntu3_amd64.deb containing nginx-full:
 nginx-full conflicts with nginx-core
  nginx-core (version 1.4.6-1ubuntu3) is present and installed.

dpkg: error processing archive nginx-full_1.4.6-1ubuntu3_amd64.deb (--install):
 conflicting packages - not installing nginx-full
Errors were encountered while processing:
 nginx-full_1.4.6-1ubuntu3_amd64.deb
root@test-udprf:/home/a.bolshedvorskii# dpkg --configure nginx-core
dpkg: error processing package nginx-core (--configure):
 package nginx-core is already installed and configured
Errors were encountered while processing:
 nginx-core
root@test-udprf:/home/a.bolshedvorskii# dpkg -i nginx_1.4.6-1ubuntu3_all.deb
(Reading database ... 37499 files and directories currently installed.)
Preparing to unpack nginx_1.4.6-1ubuntu3_all.deb ...
Unpacking nginx (1.4.6-1ubuntu3) over (1.4.6-1ubuntu3) ...
Setting up nginx (1.4.6-1ubuntu3) ...

What could be causing this issue?

Edited: Any package installed after nginx-common is blocking others.

root@test-udprf:/home/a.bolshedvorskii# dpkg -i nginx-naxsi_1.4.6-1ubuntu3_amd64.deb
dpkg: regarding nginx-naxsi_1.4.6-1ubuntu3_amd64.deb containing nginx-naxsi:
 nginx-naxsi conflicts with nginx-light
  nginx-light (version 1.4.6-1ubuntu3) is present and installed.

dpkg: error processing archive nginx-naxsi_1.4.6-1ubuntu3_amd64.deb (--install):
 conflicting packages - not installing nginx-naxsi
Errors were encountered while processing:
 nginx-naxsi_1.4.6-1ubuntu3_amd64.deb
Asked By: Bolshedvorskii

||

What could be causing this issue?

The issue is you’re installing a version of nginx that wasn’t built for you system (no matter which supported version of Ubuntu you have). This is known to cause dependency problems.

Research into old versions of software shouldn’t really be carried out on a main system. This is better done using Virtual Machines or Containers. This also makes it more suitable to custom build old versions to match your environments.

The correct way to install an old application like this would be to build it from source into your current environment.

Answered By: Artur Meinild