Dear Sir/Madam,
Good day.
I've have some errors in installing rust for Raspberry Pi using armv7-unknown-linux-musleabihf platform, which is not supported.
Full Error Logs:
Error response from daemon: No such image: test-api:latest
[+] Building 24.9s (10/11) docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.00kB 0.0s
=> [internal] load metadata for docker.io/library/python:3.9-alpine 2.2s
=> [1/7] FROM docker.io/library/python:3.9-alpine@sha256:6e508b43604ff9a81907ec17405c9ad5c13664e45a5affa2206af12 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 21.78kB 0.0s
=> CACHED [2/7] WORKDIR /root 0.0s
=> CACHED [3/7] COPY ./requirements.txt /root/requirements.txt 0.0s
=> CACHED [4/7] RUN apk --no-cache add curl 0.0s
=> CACHED [5/7] RUN curl --version 0.0s
=> ERROR [6/7] RUN pip install --no-cache-dir --upgrade -r /root/requirements.txt 22.5s
------
> [6/7] RUN pip install --no-cache-dir --upgrade -r /root/requirements.txt:
7.542 Collecting requests>=2.28.1
7.646 Downloading requests-2.31.0-py3-none-any.whl (62 kB)
7.665 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 6.9 MB/s eta 0:00:00
8.006 Collecting fastapi>=0.79.1
8.016 Downloading fastapi-0.103.0-py3-none-any.whl (66 kB)
8.028 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.2/66.2 kB 19.6 MB/s eta 0:00:00
8.352 Collecting fastapi-versioning>=0.10.0
8.363 Downloading fastapi_versioning-0.10.0-py3-none-any.whl (4.9 kB)
8.498 Collecting uvicorn>=0.18.2
8.509 Downloading uvicorn-0.23.2-py3-none-any.whl (59 kB)
8.521 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.5/59.5 kB 18.6 MB/s eta 0:00:00
8.608 Collecting PyJWT>=2.4.0
8.619 Downloading PyJWT-2.8.0-py3-none-any.whl (22 kB)
8.956 Collecting charset-normalizer<4,>=2
8.968 Downloading charset_normalizer-3.2.0-py3-none-any.whl (46 kB)
8.978 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.7/46.7 kB 18.2 MB/s eta 0:00:00
9.035 Collecting idna<4,>=2.5
9.047 Downloading idna-3.4-py3-none-any.whl (61 kB)
9.059 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 kB 18.3 MB/s eta 0:00:00
9.150 Collecting certifi>=2017.4.17
9.161 Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
9.179 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 kB 19.0 MB/s eta 0:00:00
9.644 Collecting urllib3<3,>=1.21.1
9.656 Downloading urllib3-2.0.4-py3-none-any.whl (123 kB)
9.672 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.9/123.9 kB 19.7 MB/s eta 0:00:00
10.46 Collecting pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4
10.47 Downloading pydantic-2.3.0-py3-none-any.whl (374 kB)
10.50 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 374.5/374.5 kB 18.7 MB/s eta 0:00:00
10.65 Collecting starlette<0.28.0,>=0.27.0
10.66 Downloading starlette-0.27.0-py3-none-any.whl (66 kB)
10.68 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.0/67.0 kB 18.7 MB/s eta 0:00:00
11.00 Collecting typing-extensions>=4.5.0
11.01 Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB)
11.21 Collecting h11>=0.8
11.22 Downloading h11-0.14.0-py3-none-any.whl (58 kB)
11.23 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 19.4 MB/s eta 0:00:00
11.64 Collecting click>=7.0
11.65 Downloading click-8.1.7-py3-none-any.whl (97 kB)
11.66 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 20.4 MB/s eta 0:00:00
11.87 Collecting annotated-types>=0.4.0
11.88 Downloading annotated_types-0.5.0-py3-none-any.whl (11 kB)
14.39 Collecting pydantic-core==2.6.3
14.65 Downloading pydantic_core-2.6.3.tar.gz (337 kB)
14.68 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 337.2/337.2 kB 16.6 MB/s eta 0:00:00
14.98 Installing build dependencies: started
21.08 Installing build dependencies: finished with status 'done'
21.09 Getting requirements to build wheel: started
21.30 Getting requirements to build wheel: finished with status 'done'
21.31 Preparing metadata (pyproject.toml): started
21.51 Preparing metadata (pyproject.toml): finished with status 'error'
21.53 error: subprocess-exited-with-error
21.53
21.53 × Preparing metadata (pyproject.toml) did not run successfully.
21.53 │ exit code: 1
21.53 ╰─> [6 lines of output]
21.53
21.53 Cargo, the Rust package manager, is not installed or is not on PATH.
21.53 This package requires Rust and Cargo to compile extensions. Install it through
21.53 the system's package manager or via https://rustup.rs/
21.53
21.53 Checking for Rust toolchain....
21.53 [end of output]
21.53
21.53 note: This error originates from a subprocess, and is likely not a problem with pip.
21.54 error: metadata-generation-failed
21.54
21.54 × Encountered error while generating package metadata.
21.54 ╰─> See above for output.
21.54
21.54 note: This is an issue with the package mentioned above, not pip.
21.54 hint: See above for details.
21.87
21.87 [notice] A new release of pip is available: 23.0.1 -> 23.2.1
21.87 [notice] To update, run: pip install --upgrade pip
------
Dockerfile:35
--------------------
33 | # RUN cargo --help
34 |
35 | >>> RUN pip install --no-cache-dir --upgrade -r /root/requirements.txt
36 |
37 | COPY ./app /root/app
--------------------
ERROR: failed to solve: process "/bin/sh -c pip install --no-cache-dir --upgrade -r /root/requirements.txt" did not complete successfully: exit code: 1
Could provide the full documentation so we could build on it successfully?
Similar Issue:
- Need Documenetation Guide On How To Build Rust On Raspberry Pi With armv7-unknown-linux-musleabihf Platform · Issue #2201 · rust-lang/docs.rs · GitHub
- No rust-doc installed for stable-armv7-unknown-linux-gnueabihf · Issue #1665 · rust-lang/rustup · GitHub
Thank you.