hyperledger / indy-node

The server portion of a distributed ledger purpose-built for decentralized identity.
https://wiki.hyperledger.org/display/indy
Apache License 2.0
685 stars 657 forks source link

Can't Install Indy Node #1792

Closed saahinduran closed 1 year ago

saahinduran commented 1 year ago

Hi to All! Although I managed to Indy-sdk and ran code, I am facing problems with installing hyperledger-indy node. When I run the following code block:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 sudo bash -c 'echo "deb https://repo.sovrin.org/deb xenial stable" >> /etc/apt/sources.list' sudo apt-get update sudo apt-get install indy-node

I get an error like given below:

Capture

Any help is appreciated! Thanks in advance,

WadeBarnes commented 1 year ago

The installation works fine for me when using the following Dockerfile to try to simulate your issue:

FROM ubuntu:16.04
RUN apt-get update -y && apt-get install -y \
    gnupg \ 
    software-properties-common \
    apt-transport-https \
    ca-certificates

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
RUN add-apt-repository "deb https://repo.sovrin.org/deb xenial stable"

RUN apt-get update -y && apt-get install -y \
    indy-node

The resulting image contains the following packages as expected:

root@docker:/# pip3 list | grep indy

indy-crypto (0.4.5-23)
indy-node (1.12.6)
indy-plenum (1.12.6)
root@docker:/# apt list --installed | grep indy

indy-node/xenial,now 1.12.6 amd64 [installed]
indy-plenum/xenial,now 1.12.6 amd64 [installed,automatic]
libindy-crypto/xenial,now 0.4.5 amd64 [installed,automatic]
python3-indy-crypto/xenial,now 0.4.5 amd64 [installed,automatic]

Do you by chance have some other indy-node repositories registered on your VM that could be conflicting with what you are trying to install? You can list the registered repositories using grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* | grep -v deb-src.

You can list the indy-node and indy-plenum versions your VM can see using apt list -a indy-node indy-plenum

pSchlarb commented 1 year ago

I think the exact same problem has already been answered on the discord channel for indy: I will close this issue for now, if any further problems arise feel free to reopen it.

https://discord.com/channels/905194001349627914/966347413071728711/966378370260680726

Indy node /plenum depends on fixed versions of packages, but since there are newer version of that packages in the official repos apt is complaining.

Chaining the cmd together like sudo apt install indy-plenum=1.13.0~dev175 python3-libnacl=1.6.1 python3-sortedcontainers=1.5.7 works. I am not quite shure if that helps here, since it says not installable but it is a lead. However Inside the gitpod/workspace-full container, which is derived from the ubuntu 20.04 container it is working

$ sudo apt install indy-node
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
indy-plenum
The following NEW packages will be installed:
indy-node indy-plenum
0 upgraded, 2 newly installed, 0 to remove and 44 not upgraded.
Need to get 1,630 kB of archives.
After this operation, 7,696 kB of additional disk space will be used.
Do you want to continue? [Y/n] y

According to https://unix.stackexchange.com/questions/350192/apt-get-not-properly-resolving-a-dependency-on-a-fixed-version-in-a-debian-ubunt

The apt resolver does not consider the possibility that you might want to install something that is not the most recent >available version of a package in a given target release; Debian just doesn't support installing anything but the most up to date >version of a package for your system.

If you're using different repositories for each version of a (set of) package(s), then you can use pinning to prefer a given >origin, or give them a different codename and use apt's -t option to select the target release. Otherwise it's just not possible.