R
Railway2y ago
Elf

Problem with package cairo during deployment.

Hi, I try do deploy a django app but I get an error #10 36.09 Using legacy 'setup.py install' for django-libs, since package 'wheel' is not installed. #10 36.09 Using legacy 'setup.py install' for future, since package 'wheel' is not installed. #10 36.09 Using legacy 'setup.py install' for psycopg2, since package 'wheel' is not installed. #10 36.09 Using legacy 'setup.py install' for svglib, since package 'wheel' is not installed. #10 36.09 Building wheels for collected packages: pycairo #10 36.09 Building wheel for pycairo (pyproject.toml): started  #10 36.55 Building wheel for pycairo (pyproject.toml): finished with status 'error' #10 36.57 error: subprocess-exited-with-error #10 36.57 × Building wheel for pycairo (pyproject.toml) did not run successfully. #10 36.57 │ exit code: 1 #10 36.57 ╰─> [15 lines of output] #10 36.57 running bdist_wheel #10 36.57 running build #10 36.57 running build_py #10 36.57 creating build #10 36.57 creating build/lib.linux-x86_64-cpython-38 #10 36.57 creating build/lib.linux-x86_64-cpython-38/cairo #10 36.57 copying cairo/init.py -> build/lib.linux-x86_64-cpython-38/cairo  #10 36.57 copying cairo/init.pyi -> build/lib.linux-x86_64-cpython-38/cairo #10 36.57 copying cairo/py.typed -> build/lib.linux-x86_64-cpython-38/cairo #10 36.57 running build_ext #10 36.57 Package cairo was not found in the pkg-config search path. #10 36.57 Perhaps you should add the directory containing `cairo.pc' #10 36.57 to the PKG_CONFIG_PATH environment variable #10 36.57 No package 'cairo' found #10 36.57 Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1. #10 36.57 [end of output]  #10 36.57 ERROR: Failed building wheel for pycairo #10 36.57 Failed to build pycairo In localhost the app runs normally. Can anyone help me find a solution?
13 Replies
Percy
Percy2y ago
Project ID: a362b787-2e48-4636-8c5e-201e0b22cd57
Elf
ElfOP2y ago
a362b787-2e48-4636-8c5e-201e0b22cd57
Brody
Brody2y ago
add this as a nixpacks.toml file to your project
[phases.setup]
nixPkgs = ["...", "cairo"]
[phases.setup]
nixPkgs = ["...", "cairo"]
Elf
ElfOP2y ago
I created a nixpacks.toml file an placed it in my root directory. I still the same error
Brody
Brody2y ago
do you have a link to your repo?
Elf
ElfOP2y ago
GitHub
GitHub - Alexdimirop/Life-organiser
Contribute to Alexdimirop/Life-organiser development by creating an account on GitHub.
Brody
Brody2y ago
try this instead
[phases.setup]
aptPkgs = ["...", "libcairo2-dev"]
[phases.setup]
aptPkgs = ["...", "libcairo2-dev"]
Elf
ElfOP2y ago
Still does not work, but now it says also:
Brody
Brody2y ago
thought so, delete your Pocfile and put this Dockerfile in your project
Solution
Brody
Brody2y ago
Elf
ElfOP2y ago
Yes, finally! That worked. Thank you so much for your help
Brody
Brody2y ago
no problem
Brody
Brody2y ago
these comments tho lmao
Want results from more Discord servers?
Add your server