1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

iPhone+iSH Shell+Rustで古いRustしか入らなかった時に最新バージョンにする方法

Posted at

解決方法

忙しい人のために

iPhone:~# echo https://dl-cdn.alpinelinux.org/alpine/v3.19/main > /etc/apk/repositories
iPhone:~# echo https://dl-cdn.alpinelinux.org/alpine/v3.19/community >> /etc/apk/repositories
iPhone:~# apk upgrade cargo
# アップグレードが完了する
iPhone:~# cargo --version
cargo 1.72.1
# 最新バージョン

きっかけ

iPhoneしか使えない状況でもRustでWeb開発を学習したい!

前提条件

  • iPhone 13 Pro Max 128GB
  • iSH Shell 1.3.2
  • iOS 16.1.2

手順

1.rustをインストール

iPhone:~# apk add rust
# インストールが終わる

2.axumを入れようとする

iPhone:~# cargo add axum
error: no such subcommand: `add`

        Did you mean `b`?

cargo addが使えないという異変に気づく

3.cargoのバージョンを確認する

iPhone:~# cargo --version
cargo 1.52.0

2024/01/08 10:09 現在
Alpine Linuxのパッケージ管理ツールapkにて
cargoを初めとしたrustの最新バージョンは1.72.1-r0
Alpine Linux packages

バージョンが古い…

解決方法

iPhone:~# echo https://dl-cdn.alpinelinux.org/alpine/v3.19/main > /etc/apk/repositories
iPhone:~# echo https://dl-cdn.alpinelinux.org/alpine/v3.19/community >> /etc/apk/repositories
iPhone:~# apk upgrade cargo
# アップグレードが完了する
iPhone:~# cargo --version
cargo 1.72.1
# 最新バージョン
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?