aquametalabs / aquameta

Web development platform built entirely in PostgreSQL
GNU General Public License v3.0
1.1k stars 52 forks source link

Dependencies for Debian 9 #197

Closed ar-jan closed 4 years ago

ar-jan commented 4 years ago

Hello! I've been looking to try out Aquameta for a while, and I finally got to it. I used a clean Debian 9 VPS on Hetzner, and ran into a few missing dependencies. I'll list the changes I made here for a pull request.

  1. Add sendmail-bin. Without it, I get this:

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: sendmail : Depends: sendmail-bin but it is not going to be installed E: Unable to correct problems, you have held broken packages.

Even though there are no held packages or other broken packages. (I believe running apt-get again as apt-get --fix-broken could also work but this seems simpler).

  1. Add setuptools via pip. First I got ImportError: No module named setuptools. Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-PWWDMw/fusepy/. But with python-setuptools installed I later ran into UserWarning: Unknown distribution option: 'project_urls' while building the psycopg2 wheel, so I used a more recent version from pip instead.

  2. Add wheel. (Running setup.py bdist_wheel for fusepy: finished with status 'error'. error: invalid command 'bdist_wheel')

  3. Add build-essential. I got the impression clang was intended, but psycopg2 asks for gcc:

building 'psycopg2._psycopg' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/psycopg x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DPSYCOPG_VERSION=2.8.4 (dt dec pq3 ext lo64) -DPG_VERSION_NUM=110005 -DHAVE_LO64=1 -I/usr/include/python2.7 -I. -I/usr/include/postgresql -I/usr/include/postgresql/11/server -c psycopg/psycopgmodule.c -o build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o -Wdeclaration-after-statement unable to execute 'x86_64-linux-gnu-gcc': No such file or directory

And also for uwsgi I got a failure that was fixed with build-essential:

File "uwsgiconfig.py", line 750, in __init__
  raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI
Failed building wheel for uwsgi
  1. Add python-dev.

With these changes the installation worked and I have an Aquameta install to play with. It looks fascinating!

ar-jan commented 4 years ago

P.S. I reformatted packages to a single package per line and alphabetized them, because as I was making multiple successive changes the diffs looked a bit chaotic. Also makes it easier to check the list (found sudo defined twice), I hope you agree :).

erichanson commented 4 years ago

Hmm, well that didn't seem to work. You're certain it's Debian 9? I have been running against Google Cloud Platform's Debian 9 distro which I believe is pretty standard, so I'd like to get to the bottom of what might be different. Adding sendmail-bin seems totally safe, but also seems like it should be unnecessary. It feels like there is something wrong here that is causing all these errors but not sure what it might be.

ar-jan commented 4 years ago

It's certainly Debian 9, on a Hetzner VPS. I seems to be just a clean Debian distro, but one difference is they have configured some local repository mirrors. I can see what happens if I remove those -- maybe they affect resolving of dependencies?

What about the other packages -- do you expect all of setuptools, wheel, build-essential, and python-dev to be there?

erichanson commented 4 years ago

Yes certainly expected all those to be there. The "held broken packages" error seems like a clue that something is wrong but whatever it is, I'd like to get to the bottom. If you find any more clues please let me know.

ar-jan commented 4 years ago

I'd checked that there aren't actually any held packages with dpkg --get-selections | grep hold. But I just found a bit more info:

root# aptitude why-not sendmail-bin i exim4-config Conflicts sendmail-bin

Exim appears to be configured by default on Debian. I tried apt-get remove --purge exim4-config. This also fixes the sendmail install but is maybe a bit more invasive than adding sendmail-bin. The next missing package (setuptools) is still same as before. Perhaps Google has chosen to include a number of commonly used packages that aren't in the default Debian install?

erichanson commented 4 years ago

Quite possibly. I'll round up a Debian 9 ISO and see if I can reproduce locally.

erichanson commented 4 years ago

Looks good! Install working ok for you?

ar-jan commented 4 years ago

Great! Yes, the updated installation works for me.