
집에 예전에 사다 놓은 DS218j에 Rust를 설치해 볼 예정이다. 예전에 설치해보려고 했었는데 뭐가 뭔지 몰라서 설치를 못해봤었다.

DS218j의 하드웨어 스펙 참고로 32bit 이다.
Docker를 지원하지 않는다...

먼저 ssh로 NAS에 접속한다.

rustup.rs 링크에서 리눅스용 터미널 커맨드를 복사 붙여 넣기 하였다.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
그랬더니 오류가 나왔다.
error: Cannot execute /tmp/tmp.lSpi4HlAnJ/rustup-init (likely because of mounting /tmp as noexec).
error: Please copy the file to a location where you can execute binaries and run ./rustup-init.
검색해보니 noexec 옵션 때문에 /tmp를 사용 할 수 없다는 것이었다.
#홈 디렉터리에 tmp폴더 만들기
mkdir -p ~/tmp
#Rust 설치스크립트 다운로드
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o ~/rustup-init.sh
#실행 권한 부여
chmod +x ~/rustup-init.sh
#홈 디렉터리 tmp를 임시폴더로 설정 및 실행
TMPDIR=~/tmp ~/rustup-init.sh
# 임시 해제 (재부팅 시 초기화)
sudo mount -o remount,exec /tmp
# 설치
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

설치 화면이 잘 나온다.

설치완료

버전 확인
error: linker `arm-linux-gnueabihf-gcc` not found
|
= note: No such file or directory (os error 2)
error: could not compile `api-server` (bin "api-server") due to 1 previous error
Rust가 크로스 컴파일 링커를 찾지 못하고 있어서 인데
외부에서 크로스 컴파일을 하거나 Docker를 사용하라는 솔루션이 있는데 Docker를 지원하지 않기 때문에 어쩔 수 없이 외부에서 빌드를 해서 실행 하는 방향으로 생각해봐야겠다.
설치는 할 수 있으나. 컴파일이 되지 않는다.