Install Neo4j on Amazon Linux

i am facing issue while installing Neo4j on amazon Linux by following below link .

error while executing step 2 (Install the adapter:) of document

[root@ip-172-31-14-184 ~]# sudo yum install https://dist.neo4j.org/neo4j-java11- adapter.noarch.rpm
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
neo4j-java11-adapter.noarch.rpm | 5.9 kB 00:00
Examining /var/tmp/yum-root-9RMWSn/neo4j-java11-adapter.noarch.rpm: neo4j-java11 -adapter-1-1.noarch
Marking /var/tmp/yum-root-9RMWSn/neo4j-java11-adapter.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package neo4j-java11-adapter.noarch 0:1-1 will be installed
--> Processing Dependency: jre >= 2000:11 for package: neo4j-java11-adapter-1-1. noarch
--> Finished Dependency Resolution
Error: Package: neo4j-java11-adapter-1-1.noarch (/neo4j-java11-adapter.noarch)
** Requires: jre >= 2000:11**
Available: 1:java-1.7.0-openjdk-1.7.0.161-2.6.12.0.amzn2.x86_64 (amzn 2-core)
jre = 1.7.0
Available: 1:java-1.7.0-openjdk-1.7.0.181-2.6.14.5.amzn2.x86_64 (amzn 2-core)
jre = 1.7.0
Available: 1:java-1.7.0-openjd

Hi @nikhils ,

This error happens because you are trying to install the adapter, without installing the Oracle Java 11 JDK (as specified on the documentation as step 2.a.).

Besides, keep in mind that, if you are installing Neo4j on Amazon Linux, you don't need to execute only these commands (and you don't need to install java11, as neo4j installer will do it automatically):

amazon-linux-extras enable java-openjdk11

Install Neo4J

yum install neo4j-4.3.6

Validate the Neo4j installation

rpm -qa | grep neo

Hope this helps
`

1 Like

@tfontanella011 thank you for the updates.
I tried the steps you highlighted in the comments, but it is failing at the end with CYpher-shell with the following error,

(27/29): java-11-amazon-corretto-headless-11.0.13+8-1.amzn2.x86_64.rpm | 164 MB 00:00:03
warning: /var/cache/yum/x86_64/2/neo4j/packages/cypher-shell-4.3.7-1.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID d37f5f19: NOKEY ] 34 MB/s | 187 MB 00:00:03 ETA
Public key for cypher-shell-4.3.7-1.noarch.rpm is not installed
(28/29): cypher-shell-4.3.7-1.noarch.rpm | 19 MB 00:00:03
(29/29): neo4j-4.3.6-1.noarch.rpm | 101 MB 00:00:11

Total 25 MB/s | 291 MB 00:00:11

Public key for neo4j-4.3.6-1.noarch.rpm is not installed

The rpm output doesn't show the Neo4J version,

strong text[root@ip-172-31-2-238 yum.repos.d]# rpm -qa | grep neo
strong text[root@ip-172strong text-31-2-238 yum.repos.d]#

Hi @nikhils

Ok, then you need to install Oracle Java 11 JDK, which you can download from the Oracle website or this alernative link .

After doing that, proceed to install the adapter with the following command:

sudo yum install https://dist.neo4j.org/neo4j-java11-adapter.noarch.rpm

And then proceed with the other commands already mentioned before.

Hope this helps

did you import the GPG key like the instructions say?
This should be enough to install on amazon linux:

amazon-linux-extras enable java-openjdk11
rpm --import https://debian.neo4j.com/neotechnology.gpg.key
cat <<EOF >  /etc/yum.repos.d/neo4j.repo
[neo4j]
name=Neo4j RPM Repository
baseurl=https://yum.neo4j.com/stable
enabled=1
gpgcheck=1
EOF

yum install neo4j-4.3.6