Question

Won't install Sqlite3 in app platform

Posted September 23, 2021 98 views
SQLite

Hi, I’m trying to deploy an app on DO app platform through Github repo, and during the dploymnt I see that it can’t install sqlite3.

I’m deploying Python worker app.

[sariqdevbot] [2021-09-23 11:07:49] rm: cannot remove '/workspace/.heroku/python/apt/state/lists': Directory not empty
[sariqdevbot] [2021-09-23 11:07:49] Sqlite3 failed to install.

Full Log below:

[sariqdevbot] [2021-09-23 11:06:00] => Initializing build
[sariqdevbot] [2021-09-23 11:06:00] => Retrieving source code to /workspace
[sariqdevbot] [2021-09-23 11:06:00] => Selecting branch "sqlite"
[sariqdevbot] [2021-09-23 11:06:01] => Checking out commit "bf9fb484fc683a1b9ae3b304830a99634f911248"
[sariqdevbot] [2021-09-23 11:06:02] => Got source_dir: /
[sariqdevbot] [2021-09-23 11:06:02] => Using workspace root /workspace
[sariqdevbot] [2021-09-23 11:06:02] 
[sariqdevbot] [2021-09-23 11:06:02] => Building app using buildpacks
[sariqdevbot] [2021-09-23 11:06:02] => Injecting app environment variables:
[sariqdevbot] [2021-09-23 11:06:02]      ADMINS BOT_TOKEN ip
[sariqdevbot] [2021-09-23 11:06:03] => Running buildpack detection
[sariqdevbot] [2021-09-23 11:06:03] 
[sariqdevbot] [2021-09-23 11:06:03] 3 of 4 buildpacks participating
[sariqdevbot] [2021-09-23 11:06:03] digitalocean/python-appdetect 0.0.2
[sariqdevbot] [2021-09-23 11:06:03] heroku/python                 0.192.4
[sariqdevbot] [2021-09-23 11:06:03] digitalocean/procfile         0.0.3
[sariqdevbot] [2021-09-23 11:06:03] 
[sariqdevbot] [2021-09-23 11:06:03] For documentation on the buildpacks used to build your app, please see:
[sariqdevbot] [2021-09-23 11:06:03]    Python: https://do.co/apps-buildpack-python
[sariqdevbot] [2021-09-23 11:06:04] 
[sariqdevbot] [2021-09-23 11:06:04] => Checking for cache from a previous build
[sariqdevbot] [2021-09-23 11:06:06] Layer cache not found
[sariqdevbot] [2021-09-23 11:06:09] Layer cache not found
[sariqdevbot] [2021-09-23 11:06:09] 
[sariqdevbot] [2021-09-23 11:06:09] => Building app
[sariqdevbot] [2021-09-23 11:06:09] 
[sariqdevbot] [2021-09-23 11:06:11] -----> Installing python-3.9.4
[sariqdevbot] [2021-09-23 11:06:27] -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
[sariqdevbot] [2021-09-23 11:06:56] -----> Installing dependencies with Pipenv 2020.11.15
[sariqdevbot] [2021-09-23 11:06:57]        Installing dependencies from Pipfile.lock (074029)...
[sariqdevbot] [2021-09-23 11:07:25] -----> Installing SQLite3
[sariqdevbot] [2021-09-23 11:07:49] rm: cannot remove '/workspace/.heroku/python/apt/state/lists': Directory not empty
[sariqdevbot] [2021-09-23 11:07:49] Sqlite3 failed to install.
[sariqdevbot] [2021-09-23 11:08:10] 
[sariqdevbot] [2021-09-23 11:08:10] => Uploading the built Docker image to the container registry...
[sariqdevbot] [2021-09-23 11:08:12] Reusing layers from image <registry-uri-0>
[sariqdevbot] [2021-09-23 11:08:14] Reusing layer 'heroku/python:profile'
[sariqdevbot] [2021-09-23 11:08:43] Adding 1/1 app layer(s)
[sariqdevbot] [2021-09-23 11:08:43] Reusing layer 'launcher'
[sariqdevbot] [2021-09-23 11:08:43] Reusing layer 'config'
[sariqdevbot] [2021-09-23 11:08:43] Adding label 'io.buildpacks.lifecycle.metadata'
[sariqdevbot] [2021-09-23 11:08:43] Adding label 'io.buildpacks.build.metadata'
[sariqdevbot] [2021-09-23 11:08:43] Adding label 'io.buildpacks.project.metadata'
[sariqdevbot] [2021-09-23 11:10:13] *** Images (sha256:ab3d02bdf9908e942beed438bfa951f0f28fa85b3192de5ef094191eb48dc3a6):
[sariqdevbot] [2021-09-23 11:10:13]       <image-1>
[sariqdevbot] [2021-09-23 11:10:13] Layer cache not found
[sariqdevbot] [2021-09-23 11:10:25] Adding cache layer 'heroku/python:shim'
[sariqdevbot] [2021-09-23 11:11:34] => Uploaded the built image to the container registry
[sariqdevbot] [2021-09-23 11:11:34] => Build complete
edited by kamaln7

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hello,

As per the answer here, if you’re using buildpacks with App Platform, apt commands are not supported, though there are plans to offer a method to do this in the future.

A workaround is to build and deploy using a Dockerfile.

Also keep in mind that you should not use SQLite with the App platform, as the data would be lost every time you do a new deployment. I would recommend using a Dev database or a Managed database service instead:

https://docs.digitalocean.com/products/app-platform/how-to/manage-databases/

Best,
Bobby