cloudfoundry / apt-buildpack

MIT License
29 stars 48 forks source link

failed apt-get install Reading package lists... #141

Closed joeck closed 1 year ago

joeck commented 1 year ago

I'm getting this error when trying to deploy a python package to cloud foundry with apt-buildpack#0.3.0: Error running supply: failed apt-get install Reading package lists... Package has been up and running without issues on #0.2.11 but with cflinuxfs3 being deprecated I increased version to support cflinuxfs4.

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? cf version 8.6.1+b5a352a.2023-02-27

What version of the buildpack you are using? 0.3.0

If you were attempting to accomplish a task, what was it you were attempting to do? deploy mta python application to cf

What did you expect to happen? successful deployment

What was the actual behavior? deployment fails with error: Error running supply: failed apt-get install Reading package lists...

mta.yaml:

modules:
- name: EfA-AI-services
    type: python
    path: ai
    parameters:
      buildpacks:
        [
          https://github.com/cloudfoundry/apt-buildpack#v0.3.0,
          python_buildpack
        ]
      disk-quota: 4G
      memory: 4G
      instances: 1
      command: python main.py
    provides:
      - name: ai-api
        public: true
        properties:
          ai-url: ${default-url}
    [...]

apt.yaml:

--- 
packages:
- ffmpeg
- libsm6
- libxext6
- libglib2.0-0
- libgl1
- libgtk-3-dev
- libavformat-dev
- libswscale-dev
- libjpeg-dev
- gfortran
- openexr
- libatlas-base-dev
- libtbb2
- libtbb-dev
- libdc1394-22-dev
- libopenexr-dev
- libgstreamer-plugins-base1.0-dev
- libgstreamer1.0-dev
- libleptonica-dev 
- tesseract-ocr 
- libtesseract-dev
- python3-pil
- tesseract-ocr-eng
- tesseract-ocr-script-latn

requirements.txt:

numpy==1.23.2
pytesseract~=0.3.10
requests==2.28.1
flask==2.2.2
readmrz~=0.0.1
setuptools==65.3.0
opencv-python

runtime.txt:

python-3.9.x

Reproduction:

  1. Create python application
  2. Build with mbt build
  3. Deploy to cf with cf deploy your-file.mtar

Please confirm where necessary:

arjun024 commented 1 year ago
joeck commented 1 year ago

thanks for your answer arjun. my bad on not updating this, I was able to resolve it myself

turns out the package libdc1394-22-dev was removed as mentioned here

changing to libdc1394-dev resolved the issue.

cheers