djangoforbeginners
djangoforbeginners copied to clipboard
chap 3 page 77, flyctl deploy failed
I was able to follow the instructions up to fly launch, but got stuck on flyctl deploy. Below is the command line output after trying the "flyctl deploy" command. I included only the end part with the error. I googled the gcc error and it said something about issues using a slim version of Python, but your Dockerfile in git also shows slim, so I'm not sure. Its possible I wouldn't need to build the wheel if I installed something but I have no idea where to start looking for that.
#0 14.00 building 'multidict._multidict' extension #0 14.00 creating build/temp.linux-x86_64-cpython-312 #0 14.00 creating build/temp.linux-x86_64-cpython-312/multidict #0 14.00 gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/usr/local/include/python3.12 -c multidict/_multidict.c -o build/temp.linux-x86_64-cpython-312/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic #0 14.00 error: command 'gcc' failed: No such file or directory #0 14.00 [end of output] #0 14.00 #0 14.00 note: This error originates from a subprocess, and is likely not a problem with pip. #0 14.00 ERROR: Failed building wheel for multidict #0 14.00 Failed to build multidict #0 14.00 ERROR: Could not build wheels for multidict, which is required to install pyproject.toml-based projects
Error: failed to fetch an image or build from source: error building: failed to solve: executor failed running [/bin/sh -c set -ex && pip install --upgrade pip && pip install -r /tmp/requirements.txt && rm -rf /root/.cache/]: exit code: 1
The next project in the book deployed correctly on Fly.io. (The Message Board project, deployed in chapter 5 on page 116) So I'm not sure why the earlier project didn't work for me.
Hmm. Unfortunately, I've had inconsistent luck with Fly myself at times. Somehow the build was corrupted here I'd wager. Glad it eventually worked for you. Deployment is just hard, even with a PAAS.