热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

pearadmin运行报错

从pearadmin下载了golang版本的代码,按照要求都配置好了,mac下就是跑不起来,第一感觉是库里边的代码有问题,但

从pear admin 下载了golang版本的代码,按照要求都配置好了,mac下就是跑不起来,第一感觉是库里边的代码有问题,但是我又没有找到问题,后来我又在ubuntu上down了代码,ubuntu上可以跑起来,这时我才知道应该是mac的golang环境的问题。

192:pear-admin-go sandy$ go run main.go
{"level":"info","time":"2022-05-14 10:20:45.485","caller":"/Volumes/macHDD/go_path/src/github.com/pear-admin-go/app/core/log/log.go:66","msg":"log 初始化成功","serverName":"pear-admin-go"}[2022-05-14 10:20:48] [info] replacing callback `gorm:update_time_stamp` from /Volumes/macHDD/go_path/src/github.com/pear-admin-go/app/core/db/db.go:159 [2022-05-14 10:20:48] [info] replacing callback `gorm:update_time_stamp` from /Volumes/macHDD/go_path/src/github.com/pear-admin-go/app/core/db/db.go:160
{"level":"info","time":"2022-05-14 10:20:48.154","caller":"/Volumes/macHDD/go_path/src/github.com/pear-admin-go/app/core/redis/redis.go:29","msg":"redis connect ping response:","serverName":"pear-admin-go","pong":"PONG"}
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.- using env: export GIN_MODE=release- using code: gin.SetMode(gin.ReleaseMode)[GIN-debug] GET /runtime/upload/images/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (1 handlers)
[GIN-debug] HEAD /runtime/upload/images/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (1 handlers)
[GIN-debug] GET /runtime/file/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (1 handlers)
[GIN-debug] HEAD /runtime/file/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (1 handlers)
[GIN-debug] GET /static/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (1 handlers)
[GIN-debug] HEAD /static/*filepath --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (1 handlers)
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fffb4a702fa]runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fffb4a702fa
stack: frame={sp:0x700001fbbd98, fp:0x700001fbbde8} stack=[0x700001f3c278,0x700001fbbe78)
0x0000700001fbbc98: 0x0100700001fbbcb8 0x0000000000000004
0x0000700001fbbca8: 0x000000000000001f 0x00007fffb4a702fa
0x0000700001fbbcb8: 0x0b01dfacedebac1e 0x0000000000000001
0x0000700001fbbcc8: 0x0000000004034991 0x0000700001fbbd68
0x0000700001fbbcd8: 0x000000000499ad97 0x0000700001fbbd20
0x0000700001fbbce8: 0x0000000004034c48 0x000000c0000011e0
0x0000700001fbbcf8: 0x0000000000000001 0x0000000000000001
0x0000700001fbbd08: 0x0000700001fbbd68 0x0000000004034991
0x0000700001fbbd18: 0x000000c0000011e0 0x0000700001fbbd58
0x0000700001fbbd28: 0x0000000004034bd0 0x0000700001fbbd38
0x0000700001fbbd38: 0x0000000004034c00 0x000000c0000011e0
0x0000700001fbbd48: 0x0000000004034991 0x0000700001fbbd68
0x0000700001fbbd58: 0x0000700001fbbd88 0x0000000004034991
0x0000700001fbbd68: 0x0000700001fbbd70 0x00000000040349c0
0x0000700001fbbd78: 0x00000000049a6a18 0x000000000000002a
0x0000700001fbbd88: 0x0000700001fbbdd8 0x000000000404a1b6
0x0000700001fbbd98: <0x00000000049a6a18 0x000000000403902d
0x0000700001fbbda8: 0x000005e9f655e64a 0x0000700001fbbde0
0x0000700001fbbdb8: 0x0000700001fbbde0 0x000000000403be4f
0x0000700001fbbdc8: 0x000000c0000001d8 0x0000000200000001
0x0000700001fbbdd8: 0x0000700001fbbe20 !0x00007fffb4a702fa
0x0000700001fbbde8: >0x0000700001fbbe20 0x0000000005d2c020
0x0000700001fbbdf8: 0x00000000000003f3 0x00000000043358e5
0x0000700001fbbe08: 0x00000000040672bf 0x000000c00016dcc0
0x0000700001fbbe18: 0x000000c000062d80 0x000000c00016dc90
0x0000700001fbbe28: 0x0000000004065110 0x0000700001fbbe60
0x0000700001fbbe38: 0x000000000400e4ce 0x0000000000000028
0x0000700001fbbe48: 0x000000c0004649c0 0x0000000006110c00
0x0000700001fbbe58: 0x0000000000000398 0x000000c0000001a0
0x0000700001fbbe68: 0x0000000004063229 0x0000000000000000
runtime.throw({0x49a6a18, 0x403902d})/usr/local/go/src/runtime/panic.go:1198 &#43;0x71
runtime: unexpected return pc for runtime.sigpanic called from 0x7fffb4a702fa
stack: frame&#61;{sp:0x700001fbbd98, fp:0x700001fbbde8} stack&#61;[0x700001f3c278,0x700001fbbe78)
0x0000700001fbbc98: 0x0100700001fbbcb8 0x0000000000000004
0x0000700001fbbca8: 0x000000000000001f 0x00007fffb4a702fa
0x0000700001fbbcb8: 0x0b01dfacedebac1e 0x0000000000000001
0x0000700001fbbcc8: 0x0000000004034991 0x0000700001fbbd68
0x0000700001fbbcd8: 0x000000000499ad97 0x0000700001fbbd20
0x0000700001fbbce8: 0x0000000004034c48 0x000000c0000011e0
0x0000700001fbbcf8: 0x0000000000000001 0x0000000000000001
0x0000700001fbbd08: 0x0000700001fbbd68 0x0000000004034991
0x0000700001fbbd18: 0x000000c0000011e0 0x0000700001fbbd58
0x0000700001fbbd28: 0x0000000004034bd0 0x0000700001fbbd38
0x0000700001fbbd38: 0x0000000004034c00 0x000000c0000011e0
0x0000700001fbbd48: 0x0000000004034991 0x0000700001fbbd68
0x0000700001fbbd58: 0x0000700001fbbd88 0x0000000004034991
0x0000700001fbbd68: 0x0000700001fbbd70 0x00000000040349c0
0x0000700001fbbd78: 0x00000000049a6a18 0x000000000000002a
0x0000700001fbbd88: 0x0000700001fbbdd8 0x000000000404a1b6
0x0000700001fbbd98: <0x00000000049a6a18 0x000000000403902d
0x0000700001fbbda8: 0x000005e9f655e64a 0x0000700001fbbde0
0x0000700001fbbdb8: 0x0000700001fbbde0 0x000000000403be4f
0x0000700001fbbdc8: 0x000000c0000001d8 0x0000000200000001
0x0000700001fbbdd8: 0x0000700001fbbe20 !0x00007fffb4a702fa
0x0000700001fbbde8: >0x0000700001fbbe20 0x0000000005d2c020
0x0000700001fbbdf8: 0x00000000000003f3 0x00000000043358e5
0x0000700001fbbe08: 0x00000000040672bf 0x000000c00016dcc0
0x0000700001fbbe18: 0x000000c000062d80 0x000000c00016dc90
0x0000700001fbbe28: 0x0000000004065110 0x0000700001fbbe60
0x0000700001fbbe38: 0x000000000400e4ce 0x0000000000000028
0x0000700001fbbe48: 0x000000c0004649c0 0x0000000006110c00
0x0000700001fbbe58: 0x0000000000000398 0x000000c0000001a0
0x0000700001fbbe68: 0x0000000004063229 0x0000000000000000
runtime.sigpanic()/usr/local/go/src/runtime/signal_unix.go:719 &#43;0x396goroutine 1 [syscall]:
syscall.syscall(0x43358e0, 0x1, 0x40487413, 0xc00016dd50)/usr/local/go/src/runtime/sys_darwin.go:22 &#43;0x3b fp&#61;0xc00016dcc0 sp&#61;0xc00016dca0 pc&#61;0x4061d5b
syscall.syscall(0x40716a6, 0x4, 0xc00016dd78, 0x40715d8):1 &#43;0x26 fp&#61;0xc00016dd08 sp&#61;0xc00016dcc0 pc&#61;0x4067a86
golang.org/x/sys/unix.ioctl(0x49805ff, 0x4, 0x100c0004126c0)/Volumes/macHDD/go_path/pkg/mod/golang.org/x/sys&#64;v0.0.0-20210423185535-09eb48e85fd7/unix/zsyscall_darwin_amd64.go:690 &#43;0x39 fp&#61;0xc00016dd38 sp&#61;0xc00016dd08 pc&#61;0x4335579
golang.org/x/sys/unix.IoctlGetTermios(...)/Volumes/macHDD/go_path/pkg/mod/golang.org/x/sys&#64;v0.0.0-20210423185535-09eb48e85fd7/unix/ioctl.go:73
github.com/mattn/go-isatty.IsTerminal(0x49805ff)/Volumes/macHDD/go_path/pkg/mod/github.com/mattn/go-isatty&#64;v0.0.12/isatty_bsd.go:10 &#43;0x50 fp&#61;0xc00016dda8 sp&#61;0xc00016dd38 pc&#61;0x4617230
github.com/gin-gonic/gin.LoggerWithConfig({0x0, {0x0, 0x0}, {0x0, 0x0, 0x0}})/Volumes/macHDD/go_path/pkg/mod/github.com/gin-gonic/gin&#64;v1.7.1/logger.go:220 &#43;0x174 fp&#61;0xc00016de28 sp&#61;0xc00016dda8 pc&#61;0x4622c94
github.com/gin-gonic/gin.Logger(...)/Volumes/macHDD/go_path/pkg/mod/github.com/gin-gonic/gin&#64;v1.7.1/logger.go:184
pear-admin-go/app/router.InitRouter({0xc00053bf40}, {0xc00005e6e8})/Volumes/macHDD/go_path/src/github.com/pear-admin-go/app/router/router.go:28 &#43;0x2f8 fp&#61;0xc00016dec8 sp&#61;0xc00016de28 pc&#61;0x47018b8
main.main()/Volumes/macHDD/go_path/src/github.com/pear-admin-go/main.go:36 &#43;0xf8 fp&#61;0xc00016df80 sp&#61;0xc00016dec8 pc&#61;0x4702e18
runtime.main()/usr/local/go/src/runtime/proc.go:255 &#43;0x227 fp&#61;0xc00016dfe0 sp&#61;0xc00016df80 pc&#61;0x4037027
runtime.goexit()/usr/local/go/src/runtime/asm_amd64.s:1581 &#43;0x1 fp&#61;0xc00016dfe8 sp&#61;0xc00016dfe0 pc&#61;0x4065401goroutine 10 [chan receive]:
github.com/natefinch/lumberjack.(*Logger).millRun(0xc0000a8fc0)/Volumes/macHDD/go_path/pkg/mod/github.com/natefinch/lumberjack&#64;v2.0.0&#43;incompatible/lumberjack.go:379 &#43;0x45
created by github.com/natefinch/lumberjack.(*Logger).mill.func1/Volumes/macHDD/go_path/pkg/mod/github.com/natefinch/lumberjack&#64;v2.0.0&#43;incompatible/lumberjack.go:390 &#43;0x93goroutine 11 [select]:
database/sql.(*DB).connectionOpener(0xc00022d380, {0x5854e38, 0xc000494e40})/usr/local/go/src/database/sql/sql.go:1196 &#43;0x93
created by database/sql.OpenDB/usr/local/go/src/database/sql/sql.go:794 &#43;0x188goroutine 12 [select]:
github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher.func1()/Volumes/macHDD/go_path/pkg/mod/github.com/go-sql-driver/mysql&#64;v1.5.0/connection.go:621 &#43;0xb0
created by github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher/Volumes/macHDD/go_path/pkg/mod/github.com/go-sql-driver/mysql&#64;v1.5.0/connection.go:618 &#43;0x105goroutine 50 [chan receive]:
github.com/go-redis/redis/internal/pool.(*ConnPool).reaper(0xc000134e70, 0xc0000a8fc0)/Volumes/macHDD/go_path/pkg/mod/github.com/go-redis/redis&#64;v6.15.9&#43;incompatible/internal/pool/pool.go:449 &#43;0x87
created by github.com/go-redis/redis/internal/pool.NewConnPool/Volumes/macHDD/go_path/pkg/mod/github.com/go-redis/redis&#64;v6.15.9&#43;incompatible/internal/pool/pool.go:99 &#43;0x1be
exit status 2

执行下面这个命令  go get golang.org/x/sys  升级 golang.org/x/sys就解决了


推荐阅读
  • 在多线程并发环境中,普通变量的操作往往是线程不安全的。本文通过一个简单的例子,展示了如何使用 AtomicInteger 类及其核心的 CAS 无锁算法来保证线程安全。 ... [详细]
  • C++ 开发实战:实用技巧与经验分享
    C++ 开发实战:实用技巧与经验分享 ... [详细]
  • Spring – Bean Life Cycle
    Spring – Bean Life Cycle ... [详细]
  • 单片微机原理P3:80C51外部拓展系统
      外部拓展其实是个相对来说很好玩的章节,可以真正开始用单片机写程序了,比较重要的是外部存储器拓展,81C55拓展,矩阵键盘,动态显示,DAC和ADC。0.IO接口电路概念与存 ... [详细]
  • 多线程基础概览
    本文探讨了多线程的起源及其在现代编程中的重要性。线程的引入是为了增强进程的稳定性,确保一个进程的崩溃不会影响其他进程。而进程的存在则是为了保障操作系统的稳定运行,防止单一应用程序的错误导致整个系统的崩溃。线程作为进程的逻辑单元,多个线程共享同一CPU,需要合理调度以避免资源竞争。 ... [详细]
  • 本文详细解析了使用C++实现的键盘输入记录程序的源代码,该程序在Windows应用程序开发中具有很高的实用价值。键盘记录功能不仅在远程控制软件中广泛应用,还为开发者提供了强大的调试和监控工具。通过具体实例,本文深入探讨了C++键盘记录程序的设计与实现,适合需要相关技术的开发者参考。 ... [详细]
  • 经过两天的努力,终于成功解决了半平面交模板题POJ3335的问题。原来是在`OnLeft`函数中漏掉了关键的等于号。通过这次训练,不仅加深了对半平面交算法的理解,还提升了调试和代码实现的能力。未来将继续深入研究计算几何的其他核心问题,进一步巩固和拓展相关知识。 ... [详细]
  • ButterKnife 是一款用于 Android 开发的注解库,主要用于简化视图和事件绑定。本文详细介绍了 ButterKnife 的基础用法,包括如何通过注解实现字段和方法的绑定,以及在实际项目中的应用示例。此外,文章还提到了截至 2016 年 4 月 29 日,ButterKnife 的最新版本为 8.0.1,为开发者提供了最新的功能和性能优化。 ... [详细]
  • com.hazelcast.config.MapConfig.isStatisticsEnabled()方法的使用及代码示例 ... [详细]
  • 字节流(InputStream和OutputStream),字节流读写文件,字节流的缓冲区,字节缓冲流
    字节流抽象类InputStream和OutputStream是字节流的顶级父类所有的字节输入流都继承自InputStream,所有的输出流都继承子OutputStreamInput ... [详细]
  • 如何在Java中使用DButils类
    这期内容当中小编将会给大家带来有关如何在Java中使用DButils类,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。D ... [详细]
  • 检查在所有可能的“?”替换中,给定的二进制字符串中是否出现子字符串“10”带 1 或 0 ... [详细]
  • 本文介绍了 .NET 中用于线程间通信的工具 WaitHandle 及其子类 ManualResetEvent 和 AutoResetEvent,并详细解释了线程池的概念及其在优化资源利用方面的优势。 ... [详细]
  • Vue应用预渲染技术详解与实践 ... [详细]
  • 本文详细解析了 Python 2.x 版本中 `urllib` 模块的核心功能与应用实例,重点介绍了 `urlopen()` 和 `urlretrieve()` 方法的使用技巧。其中,`urlopen()` 方法用于发送网络请求并获取响应内容,而 `urlretrieve()` 方法则用于下载文件并保存到本地。文章通过具体示例展示了这两个方法在实际开发中的应用场景,帮助读者更好地理解和掌握 `urllib` 模块的使用。 ... [详细]
author-avatar
睫毛弯弯黄小牛为
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有