kimi-cli icon indicating copy to clipboard operation
kimi-cli copied to clipboard

安装的sh脚本有bug || The installed sh script has a bug

Open zjsxply opened this issue 9 months ago • 6 comments

What version of Kimi Code CLI is running?

None

Which open platform/subscription were you using?

None

Which model were you using?

No response

What platform is your computer?

No response

What issue are you seeing?

如果是没有安装 uv 的情况,curl -LsSf https://code.kimi.com/install.sh | bash 在安装 uv 后未设置 PATH 或者使新环境变量生效,导致脚本报 Error: uv not found after installation.。需要加个source或者export之类的

What steps can reproduce the bug?

见上

What is the expected behavior?

No response

Additional information

No response


What version of Kimi Code CLI is running?

None

Which open platform/subscription were you using?

None

Which model were you using?

No response

What platform is your computer?

No response

What issue are you seeing?

If uv is not installed, curl -LsSf https://code.kimi.com/install.sh | bash does not set PATH or enable new environment variables after installing uv, causing the script to report Error: uv not found after installation.. You need to add a source or export or something like that

What steps can reproduce the bug?

See above

What is the expected behavior?

No response

Additional information

No response

zjsxply avatar Feb 11 '26 13:02 zjsxply

好像没问题呀,单独安装uv的话会提醒你配置环境变量 Image

xiaoju111a avatar Feb 11 '26 13:02 xiaoju111a

好像没问题呀,单独安装uv的话会提醒你配置环境变量 Image

你的PATH里应该已经有/root/.local/bin了。如果没有的话他会提示要设置,但是kimi安装脚本没设置就报错

zjsxply avatar Feb 11 '26 13:02 zjsxply

我用的就是那个安装脚本呀,他把uv自动安装到那个path的,如果系统不一样可能会有问题🤔


The installation script I use is the one that automatically installs uv to that path. If the system is different, there may be problems🤔

xiaoju111a avatar Feb 11 '26 13:02 xiaoju111a

把PATH里的/root/.local/bin去掉才可以复现

MacBook-Air ~ % docker run -it --rm \
  -e http_proxy=http://host.docker.internal:7999 \
  -e https_proxy=http://host.docker.internal:7999 \
  ubuntu bash -lc '
    export DEBIAN_FRONTEND=noninteractive
    apt-get -qq update &&
    apt-get -y -qq install curl ca-certificates &&
    curl -LsSf https://code.kimi.com/install.sh | bash
  '
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 4378 files and directories currently installed.)
Preparing to unpack .../libssl3t64_3.0.13-0ubuntu3.7_arm64.deb ...
Unpacking libssl3t64:arm64 (3.0.13-0ubuntu3.7) over (3.0.13-0ubuntu3.4) ...
Setting up libssl3t64:arm64 (3.0.13-0ubuntu3.7) ...
Selecting previously unselected package openssl.
(Reading database ... 4378 files and directories currently installed.)
Preparing to unpack .../00-openssl_3.0.13-0ubuntu3.7_arm64.deb ...
Unpacking openssl (3.0.13-0ubuntu3.7) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../01-ca-certificates_20240203_all.deb ...
Unpacking ca-certificates (20240203) ...
Selecting previously unselected package krb5-locales.
Preparing to unpack .../02-krb5-locales_1.20.1-6ubuntu2.6_all.deb ...
Unpacking krb5-locales (1.20.1-6ubuntu2.6) ...
Selecting previously unselected package libkrb5support0:arm64.
Preparing to unpack .../03-libkrb5support0_1.20.1-6ubuntu2.6_arm64.deb ...
Unpacking libkrb5support0:arm64 (1.20.1-6ubuntu2.6) ...
Selecting previously unselected package libk5crypto3:arm64.
Preparing to unpack .../04-libk5crypto3_1.20.1-6ubuntu2.6_arm64.deb ...
Unpacking libk5crypto3:arm64 (1.20.1-6ubuntu2.6) ...
Selecting previously unselected package libkeyutils1:arm64.
Preparing to unpack .../05-libkeyutils1_1.6.3-3build1_arm64.deb ...
Unpacking libkeyutils1:arm64 (1.6.3-3build1) ...
Selecting previously unselected package libkrb5-3:arm64.
Preparing to unpack .../06-libkrb5-3_1.20.1-6ubuntu2.6_arm64.deb ...
Unpacking libkrb5-3:arm64 (1.20.1-6ubuntu2.6) ...
Selecting previously unselected package libgssapi-krb5-2:arm64.
Preparing to unpack .../07-libgssapi-krb5-2_1.20.1-6ubuntu2.6_arm64.deb ...
Unpacking libgssapi-krb5-2:arm64 (1.20.1-6ubuntu2.6) ...
Selecting previously unselected package libnghttp2-14:arm64.
Preparing to unpack .../08-libnghttp2-14_1.59.0-1ubuntu0.2_arm64.deb ...
Unpacking libnghttp2-14:arm64 (1.59.0-1ubuntu0.2) ...
Selecting previously unselected package libpsl5t64:arm64.
Preparing to unpack .../09-libpsl5t64_0.21.2-1.1build1_arm64.deb ...
Unpacking libpsl5t64:arm64 (0.21.2-1.1build1) ...
Selecting previously unselected package publicsuffix.
Preparing to unpack .../10-publicsuffix_20231001.0357-0.1_all.deb ...
Unpacking publicsuffix (20231001.0357-0.1) ...
Selecting previously unselected package libbrotli1:arm64.
Preparing to unpack .../11-libbrotli1_1.1.0-2build2_arm64.deb ...
Unpacking libbrotli1:arm64 (1.1.0-2build2) ...
Selecting previously unselected package libsasl2-modules-db:arm64.
Preparing to unpack .../12-libsasl2-modules-db_2.1.28+dfsg1-5ubuntu3.1_arm64.deb ...
Unpacking libsasl2-modules-db:arm64 (2.1.28+dfsg1-5ubuntu3.1) ...
Selecting previously unselected package libsasl2-2:arm64.
Preparing to unpack .../13-libsasl2-2_2.1.28+dfsg1-5ubuntu3.1_arm64.deb ...
Unpacking libsasl2-2:arm64 (2.1.28+dfsg1-5ubuntu3.1) ...
Selecting previously unselected package libldap2:arm64.
Preparing to unpack .../14-libldap2_2.6.10+dfsg-0ubuntu0.24.04.1_arm64.deb ...
Unpacking libldap2:arm64 (2.6.10+dfsg-0ubuntu0.24.04.1) ...
Selecting previously unselected package librtmp1:arm64.
Preparing to unpack .../15-librtmp1_2.4+20151223.gitfa8646d.1-2build7_arm64.deb ...
Unpacking librtmp1:arm64 (2.4+20151223.gitfa8646d.1-2build7) ...
Selecting previously unselected package libssh-4:arm64.
Preparing to unpack .../16-libssh-4_0.10.6-2ubuntu0.2_arm64.deb ...
Unpacking libssh-4:arm64 (0.10.6-2ubuntu0.2) ...
Selecting previously unselected package libcurl4t64:arm64.
Preparing to unpack .../17-libcurl4t64_8.5.0-2ubuntu10.6_arm64.deb ...
Unpacking libcurl4t64:arm64 (8.5.0-2ubuntu10.6) ...
Selecting previously unselected package curl.
Preparing to unpack .../18-curl_8.5.0-2ubuntu10.6_arm64.deb ...
Unpacking curl (8.5.0-2ubuntu10.6) ...
Selecting previously unselected package libldap-common.
Preparing to unpack .../19-libldap-common_2.6.10+dfsg-0ubuntu0.24.04.1_all.deb ...
Unpacking libldap-common (2.6.10+dfsg-0ubuntu0.24.04.1) ...
Selecting previously unselected package libsasl2-modules:arm64.
Preparing to unpack .../20-libsasl2-modules_2.1.28+dfsg1-5ubuntu3.1_arm64.deb ...
Unpacking libsasl2-modules:arm64 (2.1.28+dfsg1-5ubuntu3.1) ...
Setting up libkeyutils1:arm64 (1.6.3-3build1) ...
Setting up libbrotli1:arm64 (1.1.0-2build2) ...
Setting up libsasl2-modules:arm64 (2.1.28+dfsg1-5ubuntu3.1) ...
Setting up libpsl5t64:arm64 (0.21.2-1.1build1) ...
Setting up libnghttp2-14:arm64 (1.59.0-1ubuntu0.2) ...
Setting up krb5-locales (1.20.1-6ubuntu2.6) ...
Setting up libldap-common (2.6.10+dfsg-0ubuntu0.24.04.1) ...
Setting up libkrb5support0:arm64 (1.20.1-6ubuntu2.6) ...
Setting up libsasl2-modules-db:arm64 (2.1.28+dfsg1-5ubuntu3.1) ...
Setting up librtmp1:arm64 (2.4+20151223.gitfa8646d.1-2build7) ...
Setting up libk5crypto3:arm64 (1.20.1-6ubuntu2.6) ...
Setting up libsasl2-2:arm64 (2.1.28+dfsg1-5ubuntu3.1) ...
Setting up libkrb5-3:arm64 (1.20.1-6ubuntu2.6) ...
Setting up openssl (3.0.13-0ubuntu3.7) ...
Setting up publicsuffix (20231001.0357-0.1) ...
Setting up libldap2:arm64 (2.6.10+dfsg-0ubuntu0.24.04.1) ...
Setting up ca-certificates (20240203) ...
Updating certificates in /etc/ssl/certs...
146 added, 0 removed; done.
Setting up libgssapi-krb5-2:arm64 (1.20.1-6ubuntu2.6) ...
Setting up libssh-4:arm64 (0.10.6-2ubuntu0.2) ...
Setting up libcurl4t64:arm64 (8.5.0-2ubuntu10.6) ...
Setting up curl (8.5.0-2ubuntu10.6) ...
Processing triggers for libc-bin (2.39-0ubuntu8.3) ...
Processing triggers for ca-certificates (20240203) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
downloading uv 0.10.2 aarch64-unknown-linux-gnu
no checksums to verify
installing to /root/.local/bin
  uv
  uvx
everything's installed!

To add $HOME/.local/bin to your PATH, either restart your shell or run:

    source $HOME/.local/bin/env (sh, bash, zsh)
    source $HOME/.local/bin/env.fish (fish)
Error: uv not found after installation.

zjsxply avatar Feb 11 '26 13:02 zjsxply

确实有点问题(对于我的ubuntu系统来说root path是默认的,如果其他的path要手动设置环境变量


There is indeed a problem (for my ubuntu system, the root path is the default, if other paths require manual setting of environment variables

xiaoju111a avatar Feb 11 '26 14:02 xiaoju111a

After install_uv() runs the astral.sh installer, the current shell's PATH isn't updated. Fix: source the uv env script (~/.local/bin/env or $CARGO_HOME/env) after installation, with a fallback to manually adding ~/.local/bin to PATH.

Br1an67 avatar Mar 17 '26 06:03 Br1an67