Symptoms
When attempting to install ea-nginx using the instructions outlined in our How to install ea-nginx article, you may encounter an error similar to one of the following:
error: unpacking of archive failed on file /etc/nginx/modules: cpio: rename
error: unpacking of archive failed on file /etc/nginx/modules: cpio: File from package already exists as a directory in system
Description
This error is returned as a result of an nginx path already existing, having invalid permissions, or having attributes set that disallow renaming/moving the file. This most often occurs after you've previously installed another version of nginx.
Solution
Move the /etc/nginx path to some other location and then re-attempt the installation:
mv /etc/nginx{,.$( date +%Y%m%d )}