Trouble compiling Lemmy server

https://lemmy.world/post/1108998

Trouble compiling Lemmy server - Lemmy.world

I’m attempting to get a Lemmy server running on Debian 11 using this documentation: https://join-lemmy.org/docs/administration/from_scratch.html [https://join-lemmy.org/docs/administration/from_scratch.html] The following command fails as a result of some minor version incompatibilities: cargo install lemmy_server --target-dir /usr/bin/ --locked --features embed-pictrs Removing --locked seems to work, but it fails compiling later in the process with the following output: Compiling diesel-async v0.1.1 error[E0405]: cannot find trait RowGatWorkaround in module diesel::row –> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/diesel-async-0.1.1/src/pg/row.rs:16:23 | 16 | impl<'a> diesel::row::RowGatWorkaround<'a, diesel::pg::Pg> for PgRow { | ^^^^^^^^^^^^^^^^ not found in diesel::row error[E0405]: cannot find trait RowGatWorkaround in module diesel::row –> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/diesel-async-0.1.1/src/pg/row.rs:30:39 | 30 | …diesel::row::RowGatWorkaround<'b, diesel::pg::Pg>>::Field> | ^^^^^^^^^^^^^^^^ not found in diesel::row For more information about this error, try rustc --explain E0405. error: could not compile diesel-async (lib) due to 2 previous errors error: failed to compile lemmy_server v0.17.4, intermediate artifacts can be found at /usr/bin/ Does anyone know how I can remedy this?

Instead of official lemmy documentation, I recommend github.com/ubergeek77/Lemmy-Easy-Deploy

I use it myself and it was too damn easy. Just follow the instructions on the GitHub and you’ll be up and running in less than a minute

GitHub - ubergeek77/Lemmy-Easy-Deploy: Deploy Lemmy the easy way!

Deploy Lemmy the easy way! Contribute to ubergeek77/Lemmy-Easy-Deploy development by creating an account on GitHub.

GitHub
I’ve been running around Lemmy trying to get new people to use this. This script is awesome and saved me so much time.
Thanks for the advice. I’m old school and never use Docker, but maybe it’s time I get over that. I’m actually out of my element anyway in that I do a lot of self-hosting but up to this point it has almost all used Apache and MySQL rather than Nginx and Postgres. Hopefully someone will come along with a solution for the diesel-async compiling error while I’m at work for the next few hours, but if not I’ll give your suggestion a shot this evening.

You’ll have to do some reading, but here’s some (almost) turnkey repos for all the pieces you need to host Lemmy (and other things) in docker.

I use Traefik instead of nginx to do load balancing / edge routing / reverse proxy / SSL termination (and automatic generation via LetsEncrypt - it’s proven to be bulletproof in a good few production setups.

Matt Jolly / lemmy-traefik-docker · GitLab

GitLab.com

GitLab
Oh wow that’s amazing! Docker really is amazing for hosting stuff nowadays though!