I’m trying to set up Lemmy on my VPS. The server is running Ubuntu 22.04, and is currently hosting several websites, including a Calckey instance. As such, I already have nginx set up as a reverse proxy, and PostgreSQL installed and in use . After attempting to fiddle haphazardly with docker-compose.yml with little success, I stumbled across a post from someone in a similar position to me, who was advised to try installing Lemmy from scratch.

So far, I’ve installed Rust successfully, updated Postgres to version 15.2, and overcome a few hiccups by updating build-essentials, and installing protobuf-installer, but I’ve now hit a roadblock during compilation.

The command I’m using to compile is, taken from the instructions, cargo install lemmy_server --target-dir /usr/bin/ --locked --features embed-pictrs. It successfully compiles a long list of components, but it trips over lemmy_server v0.17.0, spitting out the following error:


   Compiling lemmy_db_schema v0.17.0
error: proc macro panicked
   --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/lemmy_db_schema-0.17.0/src/utils.rs:152:44
    |
152 | pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!();
    |                                            ^^^^^^^^^^^^^^^^^^^
    |
    = help: message: Failed to receive migrations dir from None

error: could not compile `lemmy_db_schema` due to previous error
error: failed to compile `lemmy_server v0.17.0`, intermediate artifacts can be found at `/usr/bin/`

I know the instructions for this are a bit dated (as is the version it’s trying to install), and that you’re not really supporting this install method, but I was hoping someone might be feeling generous and could point me in the general direction that I need to head from here. Or, better yet, if there’s now a way to get the docker setup to work with my existing services.

Thanks in advance for any amount of help any of y’all can provide.

  • @nutomic@lemmy.ml
    link
    fedilink
    41 year ago

    I published that release manually and messed something up. Anyway the latest version is 0.17.2 so you should use that. I just noticed that it also wasnt published correctly on crates.io but that should be fixed now.

    • @Kichae@lemmy.mlOP
      link
      fedilink
      11 year ago

      Thank you! It compiles just fine now.

      I’m running into an issue at runtime, now, though, that’s puzzling me. After setting up and starting lemmy as a service, the following error is found in the journalctl log.

      lemmy_server[192097]: 2023-03-28T02:37:30.089822Z  INFO lemmy_db_schema::utils: Running Database migrations (This may take a long time) ...
      lemmy_server[192097]: thread 'main' panicked at 'Couldn't run DB Migrations', /home/username/.cargo/registry/src/github.com-1ecc6299db9ec823/lemmy_db_schema-0.17.2/src/utils.rs:161:25
      

      I’m not exactly sure what it’s attempting to migrate, but the table __diesel_schema_migrations exists, and is the only table in the database that’s populated in any way. Are you able to offer up any guidance with respect to what I may have messed up or missed?

      • @nutomic@lemmy.ml
        link
        fedilink
        21 year ago

        Looks like there is still something wrong with the installation from crates.io. In this case you will have to clone the git repository manually and compile from there.

        git clone https://github.com/LemmyNet/lemmy.git
        cargo build --release
        
        • @Kichae@lemmy.mlOP
          link
          fedilink
          21 year ago

          Ok, cool. I’m not familiar with Rust at all, so I didn’t just want to try straight from the repo from the get go, but if it’s that simple, then that’s perfect.

          Thanks!