0

Currently getting the below error when trying to install Parity with Docker on Ubuntu/ARM64:

Step 7/11 : RUN rustup target add armv7-unknown-linux-gnueabihf ---> Running in 277ab1234a23 /bin/sh: 1: rustup: not found The command '/bin/sh -c rustup target add armv7-unknown-linux-gnueabihf' returned a non-zero code: 127

I can't figure out how to resolve this issue and it is stopping the Dockerfile from being setup.

This is the Dockerfile I am using: https://github.com/paritytech/parity-snappy/blob/master/Dockerfile

The exact lines of code that lead to this error are following. It errors on the last line.

# install rustup
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

# rustup directory
ENV PATH /root/.cargo/bin:$PATH

ENV RUST_TARGETS="arm-unknown-linux-gnueabihf"

# multirust add arm--linux-gnuabhf toolchain
RUN rustup target add armv7-unknown-linux-gnueabihf

I have tried a few different suggestions from other Stack Overflow posts (such as When installing Rust toolchain in Docker, Bash `source` command doesn't work), but have had no luck.

I have Docker for linux/arm64.
System architecture below:

Linux jetson-0423318029408 4.9.108-tegra #1 SMP PREEMPT Wed Oct 31 15:17:21 PDT 2018 aarch64 aarch64 aarch64 GNU/Linux

Any help resolving this would be appreciated.

Thanks.

mattblack
  • 1,370
  • 3
  • 13
  • 19
  • Please review how to create a [MCVE] and then [edit] your question to include it. *Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and **the shortest code necessary** to reproduce it **in the question itself**.* For Docker, I'd expect that you'd include the entire Dockerfile *in your question* (links are not good enough by themselves), but only after you've removed all lines from it that don't cause the error. – Shepmaster Feb 20 '19 at 21:31
  • *tried a few different suggestions from other Stack Overflow posts* — please tell us **what** you have tried so that we don't waste our time and yours by repeating something you've already tried. – Shepmaster Feb 20 '19 at 21:38
  • @Shepmaster thanks for your feedback. I have made some changes. Hopefully this is now a more detailed question. Thanks again. – mattblack Feb 20 '19 at 21:48
  • @mattblak you still did not provide *minimal* (without useless steps) and *full* (usable via copy-paste) `Dockerfile` which fails for you. Just a suggestion for improvement. Anyway, I have few ideas/checks for troubleshooting. – Danila Kiver Feb 20 '19 at 23:38
  • 1
    (1) check that `docker inspect -f '{{.Architecture}}' ubuntu:14.04` matches your architecture. Just to be sure. – Danila Kiver Feb 20 '19 at 23:39
  • 1
    (2) before `RUN rustup target add`, add `RUN echo $PATH` and `RUN file /root/.cargo/bin/rustup`. Check that first command prints correct value of `PATH` (which should include `/root/.cargo/bin`). If it does, please post the full output of the second command here. – Danila Kiver Feb 20 '19 at 23:41
  • 1
    Not related to your problem, but there is a discrepancy between `RUST_TARGETS` which targets `arm` machines and your `rustup` command line which tries to install an `armv7` target. – Jmb Feb 21 '19 at 07:35
  • 1
    FWIW I have had issues building Parity in the past, and I found the devs on [their Gitter channel](https://gitter.im/paritytech/parity) to be very helpful. – Peter Hall Feb 21 '19 at 15:21
  • @DanilaKiver thanks for the feedback and your time helping me with this. This is the output: Step 8/13 : RUN file /root/.cargo/bin/rustup ---> Running in f084cfdb7bde /root/.cargo/bin/rustup: ERROR: cannot open `/root/.cargo/bin/rustup' (No such file or directory) The command '/bin/sh -c file /root/.cargo/bin/rustup' returned a non-zero code: 1 – mattblack Feb 21 '19 at 18:12
  • Thanks @E4_net_or_something_like_that, I'll check it out. At this stage though I think the issue is rust/docker specific. – mattblack Feb 21 '19 at 18:59
  • @mattblack probably in this case it would be a good idea to play with installer from `sh.rustup.rs` manually (run the image and perform the same installation process in the shell) to see what really happens and how (any failures or error messages, etc). It could be even better to run the installer script with `-x` option to have the precise information about the execution flow. – Danila Kiver Feb 22 '19 at 15:04
  • 1
    The Dockerfile that is **in your question** still is not a valid one. Dockerfiles that I have dealt with all start with `FROM` — it is not possible to copy and paste the code **in the question** and build it with Docker. – Shepmaster Feb 24 '19 at 15:25

0 Answers0