ubuntu - 无法在 Ubuntu 上安装 DFINITY Canister SDK

标签 ubuntu

我正在按照找到的步骤进行操作 here安装 DFINITY Canister SDK
当我运行以下命令时,未创建目录 dfx(在 /bin 下),随后无法识别 dfx 命令:

adel@adel-VirtualBox:~$ sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"

info: Executing DFINITY SDK install script, commit: dd2134837704e0daca074dd3fe09ee4ff6ebbf97

 DFINITY SDK 
 Please READ the following license: 

DFINITY Foundation -- All rights reserved. This is an ALPHA version
of the DFINITY Canister Software Development Kit (SDK). Permission is hereby granted
to use AS IS and only subject to the Alpha DFINITY Canister SDK License Agreement which
can be found here [https://sdk.dfinity.org/sdk-license-agreement.txt]. It comes with NO WARRANTY.


Do you agree and wish to install the DFINITY ALPHA SDK [y/N]?
y

info: Version found: 0.6.10
info: Creating uninstall script in ~/.cache/dfinity
info: uninstall path=/home/adel/.cache/dfinity/uninstall.sh
info: Checking for latest release...
Will install in: /home/adel/bin
info: Installed /home/adel/bin/dfx

adel@adel-VirtualBox:~$ dfx --version

Command 'dfx' not found, did you mean:

  command 'fx' from snap fx (11.1.0)
  command 'dfix' from snap dfix (0.3.5)
  command 'dx' from deb dx (1:4.4.4-12build2)
  command 'dex' from deb dex (0.8.0-2)
  command 'dfc' from deb dfc (3.1.1-1)
  command 'df' from deb coreutils (8.30-3ubuntu2)

See 'snap info <snapname>' for additional versions.

adel@adel-VirtualBox:~$ cd /bin
adel@adel-VirtualBox:/bin$ cd dfx
bash: cd: dfx: No such file or directory

以下是我的 Ubuntu 版本:

adel@adel-VirtualBox:~$ lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal

最佳答案

从安装命令的输出来看,dfx 似乎安装在 /home/adel/bin/dfx 中。你能证实:

  1. dfx 确实存在吗?
test -e /home/adel/bin/dfx && echo yay found it || echo oh no

如果没有,则好像安装没有成功。

如果是,可以直接运行:

"$HOME/bin/dfx" --version
  1. 检查您的路径是否包含“/home/adel/bin”
echo "$PATH" | tr : "\n" | grep "$HOME/bin"

如果没有,你可以添加它:

echo 'export PATH="$PATH:$HOME/bin"' >> "$HOME/.bashrc"

. "$HOME/.bashrc"

dfx --version

关于ubuntu - 无法在 Ubuntu 上安装 DFINITY Canister SDK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64228879/

相关文章:

ubuntu - 从 Ubuntu WSL 查找事件的 COM 端口(或从 bash 探测设备注册表)

r - set.seed 在不同版本的 R(和 Ubuntu)上是否一致?

linux - 从远程服务器连接到 Docker 中的 Apache Web 服务器

ubuntu - Haxe - 找不到类 : Test

php - 使用 MDBTools 驱动程序与 PHP ODBC 进行无 DSN 连接