[GH-ISSUE #85] 源码下载启动出现问题-能帮看下吗--实在不知道咋回事了... #1394

Closed
opened 2026-02-27 12:10:19 +03:00 by kerem · 21 comments
Owner

Originally created by @yuhongqiang on GitHub (Feb 27, 2023).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/85

2023/02/27 12:49:50 recordNetwork: get network err signal: killed
2023/02/27 12:49:50 getTotalDiskIO: get diskIOCounters err not implemented yet
2023/02/27 12:49:50 recordCpu: get cpuTimesBefore err not implemented yet

Originally created by @yuhongqiang on GitHub (Feb 27, 2023). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/85 2023/02/27 12:49:50 recordNetwork: get network err signal: killed 2023/02/27 12:49:50 getTotalDiskIO: get diskIOCounters err not implemented yet 2023/02/27 12:49:50 recordCpu: get cpuTimesBefore err not implemented yet
kerem closed this issue 2026-02-27 12:10:19 +03:00
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

请问是在哪个系统和架构上运行的

<!-- gh-comment-id:1445713488 --> @0xJacky commented on GitHub (Feb 27, 2023): 请问是在哪个系统和架构上运行的
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

统计部分我用了 github.com/shirou/gopsutil 这个库,看错误日志是由于这个库不兼容您的运行环境造成的,您可以尝试使用 nginx-ui 的 docker 镜像。

<!-- gh-comment-id:1445715732 --> @0xJacky commented on GitHub (Feb 27, 2023): 统计部分我用了 `github.com/shirou/gopsutil` 这个库,看错误日志是由于这个库不兼容您的运行环境造成的,您可以尝试使用 `nginx-ui `的 docker 镜像。
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

go version: go1.19.4 darwin/arm64
node: v18.9.1
软件: vscode

刚开始首次启动的时候: 我这边都启动成功了 没问题
后续不知道怎么了: 就起不来了 只要启动就报上面的错

<!-- gh-comment-id:1445720349 --> @yuhongqiang commented on GitHub (Feb 27, 2023): go version: go1.19.4 darwin/arm64 node: v18.9.1 软件: vscode 刚开始首次启动的时候: 我这边都启动成功了 没问题 后续不知道怎么了: 就起不来了 只要启动就报上面的错
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

我这边需要用源码 改动下您的源码 把前端修改下 完事重新打包发布 不能用docker....

<!-- gh-comment-id:1445725473 --> @yuhongqiang commented on GitHub (Feb 27, 2023): 我这边需要用源码 改动下您的源码 把前端修改下 完事重新打包发布 不能用docker....
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

macOS?

<!-- gh-comment-id:1445736760 --> @0xJacky commented on GitHub (Feb 27, 2023): macOS?
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

嗯嗯嗯

<!-- gh-comment-id:1445737130 --> @yuhongqiang commented on GitHub (Feb 27, 2023): 嗯嗯嗯
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

编译和编译环境都是macOS吗,我这边也是Mac,可以正常运行的

<!-- gh-comment-id:1445740995 --> @0xJacky commented on GitHub (Feb 27, 2023): 编译和编译环境都是macOS吗,我这边也是Mac,可以正常运行的
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

是呀......之前我编译启动都是好使的
就后面我不知道我干啥了......
重新安装go环境 重新下载源码 也不好使了...
能不能是我macOs 或者 go 设置啥了 导致的啊.......
所有环境重新安装都不行..... 用不用我删除下啥缓存....
我不会go语言 所以.....

<!-- gh-comment-id:1445742696 --> @yuhongqiang commented on GitHub (Feb 27, 2023): 是呀......之前我编译启动都是好使的 就后面我不知道我干啥了...... 重新安装go环境 重新下载源码 也不好使了... 能不能是我macOs 或者 go 设置啥了 导致的啊....... 所有环境重新安装都不行..... 用不用我删除下啥缓存.... 我不会go语言 所以.....
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

要不你重启一下电脑重新编译一下吧

<!-- gh-comment-id:1445745151 --> @0xJacky commented on GitHub (Feb 27, 2023): 要不你重启一下电脑重新编译一下吧
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

go build -o nginx-ui -v main.go
您说的是是这个命令吗? 重新编译

<!-- gh-comment-id:1445746446 --> @yuhongqiang commented on GitHub (Feb 27, 2023): go build -o nginx-ui -v main.go 您说的是是这个命令吗? 重新编译
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

是的

<!-- gh-comment-id:1445746753 --> @0xJacky commented on GitHub (Feb 27, 2023): 是的
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

这些操作我都做了 我再研究下 要是能研究出来 我把解决方案放上
但是我感觉费劲 估计研究不出来
搞了两个晚上了 一点进展没有...

<!-- gh-comment-id:1445747465 --> @yuhongqiang commented on GitHub (Feb 27, 2023): 这些操作我都做了 我再研究下 要是能研究出来 我把解决方案放上 但是我感觉费劲 估计研究不出来 搞了两个晚上了 一点进展没有...
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

谢谢您

<!-- gh-comment-id:1445747573 --> @yuhongqiang commented on GitHub (Feb 27, 2023): 谢谢您
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

嗯,应该没有这么麻烦,是在不行重新装一下Go的环境咯,我也是用的 ARM 处理器的 Mac 开发的,没什么问题

<!-- gh-comment-id:1445748010 --> @0xJacky commented on GitHub (Feb 27, 2023): 嗯,应该没有这么麻烦,是在不行重新装一下Go的环境咯,我也是用的 ARM 处理器的 Mac 开发的,没什么问题
Author
Owner

@Hintay commented on GitHub (Feb 27, 2023):

建议使用 go clean --modcache 清除一下 Go Module 的缓存。

<!-- gh-comment-id:1445749559 --> @Hintay commented on GitHub (Feb 27, 2023): 建议使用 `go clean --modcache` 清除一下 Go Module 的缓存。
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

或者您试一下 Release 里预编译的版本能否正常运行,如果也是无法运行的话,可能是macOS的问题

<!-- gh-comment-id:1445759879 --> @0xJacky commented on GitHub (Feb 27, 2023): 或者您试一下 Release 里预编译的版本能否正常运行,如果也是无法运行的话,可能是macOS的问题
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

2023/02/27 15:23:21 [AutoCert] Recover runtime error: invalid memory address or nil pointer dereference

<!-- gh-comment-id:1445833487 --> @yuhongqiang commented on GitHub (Feb 27, 2023): 2023/02/27 15:23:21 [AutoCert] Recover runtime error: invalid memory address or nil pointer dereference
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

这是您在本地编译的还是用的Release的

<!-- gh-comment-id:1445870375 --> @0xJacky commented on GitHub (Feb 27, 2023): 这是您在本地编译的还是用的Release的
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

Release 下载下来的二进制包 在本地运行没有问题 本地编译的问题

<!-- gh-comment-id:1445880803 --> @yuhongqiang commented on GitHub (Feb 27, 2023): Release 下载下来的二进制包 在本地运行没有问题 本地编译的问题
Author
Owner

@0xJacky commented on GitHub (Feb 27, 2023):

看一下 go 的环境,go env

我猜是 CGO_ENABLED 没开,试试编译的时候加 CGO_ENABLED=1 参数。

CGO_ENABLED=1 \
    go build -ldflags \
    "-X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'" -o nginx-ui -v main.go
<!-- gh-comment-id:1445883927 --> @0xJacky commented on GitHub (Feb 27, 2023): 看一下 go 的环境,go env 我猜是 CGO_ENABLED 没开,试试编译的时候加 `CGO_ENABLED=1` 参数。 ``` CGO_ENABLED=1 \ go build -ldflags \ "-X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'" -o nginx-ui -v main.go ```
Author
Owner

@yuhongqiang commented on GitHub (Feb 27, 2023):

好使了 好使了 嘻嘻嘻嘻嘻 嘿嘿嘿
谢谢您

<!-- gh-comment-id:1445892585 --> @yuhongqiang commented on GitHub (Feb 27, 2023): 好使了 好使了 嘻嘻嘻嘻嘻 嘿嘿嘿 谢谢您
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#1394
No description provided.