Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSTALL.md: add libleveldb-dev to required packages #3349

Closed
wants to merge 3 commits into from

Conversation

belikor
Copy link
Contributor

@belikor belikor commented Jul 5, 2021

With the provided instructions in INSTALL.md, the make command may result in errors:

    plyvel/_plyvel.cpp:589:10: fatal error: leveldb/db.h: No such file or directory
      589 | #include "leveldb/db.h"
          |          ^~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

...
Failed to build plyvel prometheus-client pylru pyyaml.

The required header files are contained in the libleveldb-dev package in Ubuntu 18.04 and 20.04 at least.

After installing this package the compilation proceeds successfully.
In some cases make may have to be run twice.

This addresses issue #3281.


Also add more information on entering and exiting the virtual environment.

deactivate  # leave
source lbry-venv/bin/activate  # enter

To test the daemon interactively, we can run the cli.py program.

python lbry/extras/cli.py start

Because of issue #2769 at the moment the lbrynet daemon will only work correctly with Python 3.7.

If Python 3.8+ is used, the daemon will start but the RPC server may not accept messages,

With the provided instructions in `INSTALL.md`,
the `make` command may result in errors:
```
    plyvel/_plyvel.cpp:589:10: fatal error: leveldb/db.h: No such file or directory
      589 | #include "leveldb/db.h"
          |          ^~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

...
Failed to build plyvel prometheus-client pylru pyyaml.
```

The required header files are contained in the `libleveldb-dev`
package in Ubuntu 18.04 and 20.04 at least.

After installing this package the compilation proceeds successfully.

In some cases `make` may have to be run twice to compile everything
without problems.
Leave with `deactivate`.

Enter the environment again with
```
source lbry-venv/bin/activate
```

When developing, we can start the server interactively.
```
python lbry/extras/cli.py start
```
Because of issue lbryio#2769 at the moment the `lbrynet` daemon
will only work correctly with Python 3.7.

The `deadsnakes` personal package archive (PPA) provides
Python 3.7 for Ubuntu distributions that no longer have it
in their official repositories like 18.04 and 20.04.

If Python 3.8 is used, the daemon will start but the RPC server
may not accept messages, returning the following:
```
Could not connect to daemon. Are you sure it's running?
```

Python 3.9 does not work either, as it fails in the compilation
of `plyvel`.
@belikor
Copy link
Contributor Author

belikor commented Jul 11, 2021

This pull request was divided into two, #3357 and #3358.

We think using plyvel=1.2.0 is a better solution than recommending the installation of libleveldb-dev but keeping plyvel=1.0.5.

@belikor belikor closed this Jul 11, 2021
@belikor belikor deleted the install-libleveldb branch July 11, 2021 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants