Build error: OSError while trying to execute sudo ... No such file or directory: 'sudo'

I am first time contributor following the documentation to build my app before creating a merge request. When executing fdroid build --on-server com.example I receive the following error: Could not build app com.harr1424.listmaker: OSError while trying to execute sudo DEBIAN_FRONTEND=noninteractive bash -x -c ... [Errno 2] No such file or directory: 'sudo'

My metadata file is as follows:

  - Reading
  - Science & Education
  - Time
  - Writing
License: MIT

Summary: A simple and easy to use list applicaton
Description: "Manage multiple areas of your life with ease. ListMaker allows you to\
    \ \ncreate a main list of categories which can each contain child  lists\nof TODO\
    \ items. Perfect for grocery, shopping, travel, and any other lists\nyou can imagine. "

RepoType: git

  - versionName: '2.1'
    versionCode: 2
    commit: v2.1
    subdir: app
      - apt-get update || apt-get update
      - apt-get install -y openjdk-11-jdk-headless
      - update-alternatives --auto java
      - yes

AutoUpdateMode: None
UpdateCheckMode: None
CurrentVersion: '2.1'
CurrentVersionCode: 2

My metadata file’s sudo section follows the documentation, can anyone explain what might be causing this error?

Builds fine, update ListMaker/build.gradle at v2.1 · harr1424/ListMaker · GitHub and retag

Guess: You don’t have sudo installed, or sudo options are not as assumed by documentation.

--on-server is not a current option so maybe it’s an old fdroidserver

that being said, on-server needs a VM via vagrant or libvirt, which one do you have?

It appears more like you run this directly in a VM or on bare metal? If so then remove --on-server

The documentation was correct, and @Licaon_Kter provided a solution. The version name in source code did not match what was provided in metadata.

Oh, I thought you’ve just replaced that when posting here :slight_smile: