Issue installing open source app server on digital ocean

Hello :slight_smile:

When following the old step-by-step instructions to install the open source anvil on a digital ocean droplet i get this error:

this was following the pip install anvil-app-server command

Many thanks for the help - Michael

That looks like one of the dependencies is missing (libpq-dev).

Did you definitely install that as per the instructions?

Hi,

I followed the digital ocean instructions very carefully. don’t kno whats going wrong,

here is a video - perhaps you can see my blindspot?

Thanks a million!

@ianthomp @meredydd - if you have any wisdom to share I’d be forever grateful… :slight_smile:

same issue when following the instructions for google cloud:

@ianthomp @meredydd

and same for amazon lightsail:

You still haven’t answered my question. Did you install libpq-dev as per the instructions in the link I pasted?

(to be clear, you are, of course, entirely free to ignore me and follow your own path to resolve this problem. However, I have a strong hunch where the problem lies and the answer to my question will confirm whether I’m correct or not).

sorry, yes I did follow your instructions, it was the fort thing I did. I was getting this error though:

However, I figured out that the way to install python was with:
sudo apt-get install python3.7

but when I followed these instructions:

AND included sudo apt-get install openjdk-8-jdk libpq-dev

I am still getting:

I am very grateful for the time you have spent trying to help. In order not to waste it, I have tried whatever I could think of to work this out. IN FACT I don’t know if this is relevent, but the “pip install anvil-app-server” command DOES work if I do not start the virtual environment. Perhaps theres something in that?

thanks for your help @owen.campbell

However, I figured out that the way to install python > > was with:
sudo apt-get install python3.7

The very first command in your cookbook instructions places you into superuser mode, so you should never have to use sudo from then until the exit

You need to ensure that all the apt commands are run in superuser mode.

I’m doing everything as laid out in the instructions - including the install libpq-dev

psycopg2 is breaking the anvil install.

This problem is across digital ocean, linode, AWS

Also there is inconsistency between the instructions here: anvil-runtime/getting-started.md at master · anvil-works/anvil-runtime · GitHub

and the instructions here: Anvil Docs | How to deploy an Anvil app to a DigitalOcean Droplet

namely that the digital ocean instructions tell you to setup and use a super user called ryan.

either way (and trust me I have tried this fro scrach in as many ways as i can possibly see from ANY instructions) its not installing.

What’s happening is that the Postgres Python package can’t build because you missing a required system dependency needed to build it. Pip can resolve Python package conflicts but can’t install system packages.

The docs for the app server take time to digest and certainly require some system administration experience.

Installing libpq-dev on Ubuntu will fix this. Some Ubuntu images might already include this, and some might not. In any event, you should consider these docs to not work in all cases, especially considering the incredibly diverse set of system configurations possible.

On Debain systems you should be able to use this command to install libpq-dev:

sudo apt-get install libpq-dev

1 Like

Everyone who is kindly helping, I promise you I am using “sudo apt-get install libpq-dev”
(see image)

yet still I get:

As an alternative, you could try installing the pip version of the psycopg2 binary: psycopg2-binary · PyPI

This might give you everything you need. I might have done this myself before but don’t remember.