Z
Zeropsβ€’4w ago
minsomai

I don't get this

zerops:
# supports monorepositories, just add
# one setup section after the other
- setup: verba
# ==== how to build your application ====
build:
base: ubuntu@24.04
prepareCommands:
- apt-get install -y build-essential
zerops:
# supports monorepositories, just add
# one setup section after the other
- setup: verba
# ==== how to build your application ====
build:
base: ubuntu@24.04
prepareCommands:
- apt-get install -y build-essential
Aren't we supposed to apt-get in the prepareCommands? because I'm getting this 2025-08-07T06:05:07.551Z 2025-08-07T06:05:07.552Z ━━━━ πŸ™ apt-get install -y build-essential ━━━━ 2025-08-07T06:05:07.552Z 2025-08-07T06:05:07.578Z E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) 2025-08-07T06:05:07.578Z E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? 2025-08-07T06:05:07.579Z 2025-08-07T06:05:07.580Z ━━━━ ❌ apt-get install -y build-essential ━━━━ 2025-08-07T06:05:07.580Z 2025-08-07T06:05:07.580Z [BUILD ERROR] failed running command => [commandExec] build command failed: map[command:[apt-get install -y build-essential] message:[exit status 100]]
7 Replies
Jan Saidl
Jan Saidlβ€’4w ago
Hi @minsomai try: sudo apt-get install -y build-essential
Jan Saidl
Jan Saidlβ€’4w ago
If you have a problem debugging a build/prepare process, it's a good idea to use Pipeline debug options and try it directly in the container. Then, make the changes in zerops.yaml. This will save you time. https://docs.zerops.io/features/debug-mode#debug-control
No description
minsomai
minsomaiOPβ€’4w ago
thank you now I'm getting this
2025-08-07T08:13:43.392Z ━━━━ πŸ™ pip install --no-cache-dir -r requirements.txt ━━━━
2025-08-07T08:13:43.392Z
2025-08-07T08:13:43.390Z pam_unix(sudo:session): session closed for user root
2025-08-07T08:13:43.723Z error: externally-managed-environment
2025-08-07T08:13:43.723Z
2025-08-07T08:13:43.723Z Γ— This environment is externally managed
2025-08-07T08:13:43.723Z ╰─> To install Python packages system-wide, try apt install
2025-08-07T08:13:43.723Z python3-xyz, where xyz is the package you are trying to
2025-08-07T08:13:43.723Z install.
2025-08-07T08:13:43.392Z ━━━━ πŸ™ pip install --no-cache-dir -r requirements.txt ━━━━
2025-08-07T08:13:43.392Z
2025-08-07T08:13:43.390Z pam_unix(sudo:session): session closed for user root
2025-08-07T08:13:43.723Z error: externally-managed-environment
2025-08-07T08:13:43.723Z
2025-08-07T08:13:43.723Z Γ— This environment is externally managed
2025-08-07T08:13:43.723Z ╰─> To install Python packages system-wide, try apt install
2025-08-07T08:13:43.723Z python3-xyz, where xyz is the package you are trying to
2025-08-07T08:13:43.723Z install.
AleΕ‘
AleΕ‘β€’4w ago
https://zerops.io/article/the-perfect-cloud-platform-for-development-and-production-of-rag-ai-apps#deploying-admin-dashboard-app-python-worker-and-api-service Can you try it like this, with uv and installing requirements on the runtime instead of the build container
No description
AleΕ‘
AleΕ‘β€’4w ago
Python is "special", it installs deps differently from any normal language.. you don't really have vendor/node_modules-like folder, it installs deps to the system, which you locally get around by using virtual envs.. but in Zerops container you are fine with installing it on the runtime container system, so the way you do it is by passing requirements.txt to the runtime prepare and installing it with uv (https://github.com/astral-sh/uv)
minsomai
minsomaiOPβ€’4w ago
zerops:
- setup: verba
# ==== how to build your application ====
build:
# Use Ubuntu 24.04 as the base for the build container
base: python@3.11
# Prepare the environment (optional, may not work due to permissions)
# Build commands to bootstrap pip and install dependencies with logging
deployFiles: .
# Pass setup.py to the run preparation phase
addToRunPrepare:
- requirements.txt

# ==== how to run your application ====
run:
# Use Ubuntu 24.04 as the base for the runtime container
base: python@3.11
# Prepare the runtime environment
prepareCommands:
- sudo apk update
- sudo apk install -y python3-pip python3-dev gcc g++ build-essential || echo "apt-get install failed due to permissions"
# - python3 -m pip install --no-cache-dir --upgrade pip || echo "pip upgrade failed"
- sudo uv pip install --system -r ./requirements.txt
# - pip install --no-cache-dir -r requirements.txt
- python3 -m pip show goldenverba
- echo "Searching for verba script in runtime..."
- find / -name verba 2>/dev/null || echo "verba script not found in runtime"

# Define the port Verba listens on (corrected to single mapping)
ports:
- port: 8000
httpSupport: true
# Start command for Verba with dynamic PATH adjustment
start: bash -c "export PATH=\$PATH:/usr/local/bin && verba start --port 8000 --host 0.0.0.0"
zerops:
- setup: verba
# ==== how to build your application ====
build:
# Use Ubuntu 24.04 as the base for the build container
base: python@3.11
# Prepare the environment (optional, may not work due to permissions)
# Build commands to bootstrap pip and install dependencies with logging
deployFiles: .
# Pass setup.py to the run preparation phase
addToRunPrepare:
- requirements.txt

# ==== how to run your application ====
run:
# Use Ubuntu 24.04 as the base for the runtime container
base: python@3.11
# Prepare the runtime environment
prepareCommands:
- sudo apk update
- sudo apk install -y python3-pip python3-dev gcc g++ build-essential || echo "apt-get install failed due to permissions"
# - python3 -m pip install --no-cache-dir --upgrade pip || echo "pip upgrade failed"
- sudo uv pip install --system -r ./requirements.txt
# - pip install --no-cache-dir -r requirements.txt
- python3 -m pip show goldenverba
- echo "Searching for verba script in runtime..."
- find / -name verba 2>/dev/null || echo "verba script not found in runtime"

# Define the port Verba listens on (corrected to single mapping)
ports:
- port: 8000
httpSupport: true
# Start command for Verba with dynamic PATH adjustment
start: bash -c "export PATH=\$PATH:/usr/local/bin && verba start --port 8000 --host 0.0.0.0"
2025-08-07T08:37:38.751Z License :: OSI Approved :: MIT License
2025-08-07T08:37:38.751Z
2025-08-07T08:37:38.751Z See
2025-08-07T08:37:38.751Z https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
2025-08-07T08:37:38.751Z for details.
2025-08-07T08:37:38.751Z
2025-08-07T08:37:38.751Z ********************************************************************************
2025-08-07T08:37:38.751Z
2025-08-07T08:37:38.751Z !!
2025-08-07T08:37:38.751Z self._finalize_license_expression()
2025-08-07T08:37:38.751Z error: command 'g++' failed: No such file or directory
2025-08-07T08:37:38.751Z
2025-08-07T08:37:38.751Z hint: This usually indicates a problem with the package or the build
2025-08-07T08:37:38.751Z environment.
2025-08-07T08:37:38.780Z
2025-08-07T08:37:38.781Z ━━━━ ❌ sudo uv pip install --system -r ./requirements.txt ━━━━
2025-08-07T08:37:38.781Z
2025-08-07T08:37:38.781Z [BUILD ERROR] failed running command => [commandExec] build command failed: map[command:[sudo uv pip install --system -r ./requirements.txt] message:[exit status 1]]
2025-08-07T08:37:40.000Z starting pid 690, tty '': '/sbin/openrc shutdown'
2025-08-07T08:37:40.000Z stopping /opt/zerops/bin/zerops-zenv, pid 599
2025-08-07T08:37:40.000Z Will stop PID 599
2025-08-07T08:37:40.000Z Sending signal 15 to PID 599
2025-08-07T08:37:38.751Z License :: OSI Approved :: MIT License
2025-08-07T08:37:38.751Z
2025-08-07T08:37:38.751Z See
2025-08-07T08:37:38.751Z https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
2025-08-07T08:37:38.751Z for details.
2025-08-07T08:37:38.751Z
2025-08-07T08:37:38.751Z ********************************************************************************
2025-08-07T08:37:38.751Z
2025-08-07T08:37:38.751Z !!
2025-08-07T08:37:38.751Z self._finalize_license_expression()
2025-08-07T08:37:38.751Z error: command 'g++' failed: No such file or directory
2025-08-07T08:37:38.751Z
2025-08-07T08:37:38.751Z hint: This usually indicates a problem with the package or the build
2025-08-07T08:37:38.751Z environment.
2025-08-07T08:37:38.780Z
2025-08-07T08:37:38.781Z ━━━━ ❌ sudo uv pip install --system -r ./requirements.txt ━━━━
2025-08-07T08:37:38.781Z
2025-08-07T08:37:38.781Z [BUILD ERROR] failed running command => [commandExec] build command failed: map[command:[sudo uv pip install --system -r ./requirements.txt] message:[exit status 1]]
2025-08-07T08:37:40.000Z starting pid 690, tty '': '/sbin/openrc shutdown'
2025-08-07T08:37:40.000Z stopping /opt/zerops/bin/zerops-zenv, pid 599
2025-08-07T08:37:40.000Z Will stop PID 599
2025-08-07T08:37:40.000Z Sending signal 15 to PID 599
got this error ^
AleΕ‘
AleΕ‘β€’4w ago
that looks like whatever deps you are installing require some C/C++ compilers that are not in Alpine by default you could probably just do
base: python@3.11
os: ubuntu
base: python@3.11
os: ubuntu
(which means switching to apt-get from apk, but I'd first try if ubuntu doesn't already have everything required installed) @Jan Saidl can you also check rest of that zerops.yml? would
start: bash -c "export PATH=\$PATH:/usr/local/bin && verba start --port 8000 --host 0.0.0.0"
start: bash -c "export PATH=\$PATH:/usr/local/bin && verba start --port 8000 --host 0.0.0.0"
work?

Did you find this page helpful?