When setting the NEO4J_ACCEPT_LICENSE_AGREEMENT environment variable during install, the license is not accepted.
As a part of an ansible script, I'm trying to install and configure Neo4j 3.5 on a server. I can suppress the prompt with DEBIAN_FRONTEND=noninteractive but this still causes a dpkg error, so the package is not installed.
For reference, this is the command that still shows the license prompt:
sudo NEO4J_ACCEPT_LICENSE_AGREEMENT=yes apt -yq install neo4j-enterprise
This is the command that suppresses the license prompt, but still gets an error:
sudo DEBIAN_FRONTEND=noninteractive apt -yq install neo4j-enterprise
Setting both environment variables in one command still produces the same error:
eading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 214 not upgraded.
2 not fully installed or removed.
Need to get 0 B/143 MB of archives.
After this operation, 164 MB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 70971 files and directories currently installed.)
Preparing to unpack .../neo4j-enterprise_1%3a3.5.28_all.deb ...
Neo4j License Rejected.
dpkg: error processing archive /var/cache/apt/archives/neo4j-enterprise_1%3a3.5.28_all.deb (--unpack):
new neo4j-enterprise package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
Has anyone encountered this before, and/or have suggestions for a solution?