Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【bug】MacbookM1 安装Yak后yak version报错,yakkit启动后不显示界面 #1893

Closed
bollowang opened this issue Aug 8, 2024 · 6 comments

Comments

@bollowang
Copy link

【bug】MacbookM1 安装Yak后yak version报错,yakkit启动后不显示界面

yak安装出错的日志

╭─ ~/Downloads ⎈ k8s.datacenter.gdd.com/istio-system
╰─❯ bash <(curl -sS -L http://oss.yaklang.io/install-latest-yak.sh)
Install for Darwin(MacOS) ARM64

Downloading for yak_darwin_arm64
--2024-08-08 13:35:56-- https://aliyun-oss.yaklang.com/yak/latest/yak_darwin_arm64
正在解析主机 aliyun-oss.yaklang.com (aliyun-oss.yaklang.com)... 119.188.172.250
正在连接 aliyun-oss.yaklang.com (aliyun-oss.yaklang.com)|119.188.172.250|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:137430786 (131M) [application/octet-stream]
正在保存至: “yak_darwin_arm64”

yak_darwin_arm64 100%[======================================================================================================================================================================================================================>] 131.06M 7.35MB/s 用时 19s

2024-08-08 13:36:15 (7.02 MB/s) - 已保存 “yak_darwin_arm64” [137430786/137430786])

Chmod +x yak_darwin_arm64
Start install yak_darwin_arm64 (ADD Yak to ENV PATH)
[INFO] 2024-08-08 13:36:16 [yak:176] current yak binary: /Users/bollo/Downloads/yak_darwin_arm64
[INFO] 2024-08-08 13:36:16 [yak:224] installed yak... now you can exec yak version to check...
[ERRO] 2024-08-08 13:36:17 [database:114] chmod +rw failed: chmod /Users/bollo/yakit-projects/yakit-profile-plugin.db: operation not permitted
[ERRO] 2024-08-08 13:36:17 [database:114] chmod +rw failed: chmod /Users/bollo/yakit-projects/default-yakit.db: operation not permitted
[ERRO] 2024-08-08 13:36:18 [database:114] chmod +rw failed: chmod /Users/bollo/yakit-projects/default-cve.db: operation not permitted
Yak Language Build Info:
BuildTime: Fri Aug 2 17:13:28 2024 +0800
GitHash: c4e9b440faa2b5a80565d41e160ba2d212f467da
Version: 1.3.5-beta2
GoVersion: go version go1.20.14 darwin/arm64
Cleaning cache file...
Finished

@WAY29
Copy link
Collaborator

WAY29 commented Aug 8, 2024

报错在于/Users/bollo/yakit-projects 这个文件夹的权限问题,请使用root删除这个文件夹之后正常启动yakit即可

@bollowang
Copy link
Author

报错在于/Users/bollo/yakit-projects 这个文件夹的权限问题,请使用root删除这个文件夹之后正常启动yakit即可

if [ "$(uname)" == "Darwin" ]; then
if [ "$(uname -m)" == "arm64" ]; then
echo "Install for Darwin(MacOS) ARM64"
echo "-------------------------------------"
echo "Downloading for yak_darwin_arm64"
wget https://aliyun-oss.yaklang.com/yak/latest/yak_darwin_arm64

echo "Chmod +x yak_darwin_arm64"
chmod +x ./yak_darwin_arm64
echo "Start install yak_darwin_arm64 (ADD Yak to ENV PATH)"
sudo ./yak_darwin_arm64 install
yak version

echo "Cleaning cache file..."
rm ./yak_darwin_arm64

echo "Finished"

那yak在mac上的安装就不应该用sudo啊,不用sudo也能写

@bollowang
Copy link
Author

报错在于/Users/bollo/yakit-projects 这个文件夹的权限问题,请使用root删除这个文件夹之后正常启动yakit即可

修改成安装的时候使用sudo ./install-latest-yak.sh安装,install-latest-yak.sh 里面的sudo去掉就可以了

@bollowang
Copy link
Author

报错在于/Users/bollo/yakit-projects 这个文件夹的权限问题,请使用root删除这个文件夹之后正常启动yakit即可

sudo在里面和外面控制的作用域不一样,在外面不会用root用户写其他用户目录文件夹

╭─ ~ k8s-01.datacenter.gdd.com/log-center
╰─❯ ls |grep yakit-projects
drwxr-xr-x@ 20 bollo staff 640B 8 9 08:22 yakit-projects

@WAY29
Copy link
Collaborator

WAY29 commented Aug 9, 2024

安装是必须使用sudo的,因为他会将二进制文件移动到/usr/local/bin目录,你这个报错是因为你以前可能以ROOT安装过yak,将yakit-project目录写成了root所有

@WAY29 WAY29 closed this as completed Aug 9, 2024
@WAY29 WAY29 reopened this Aug 9, 2024
@WAY29
Copy link
Collaborator

WAY29 commented Aug 9, 2024

问题是否已经解决?

@WAY29 WAY29 closed this as completed Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants