GithubHelp home page GithubHelp logo

编译pipi最新版本的错误 about pipe HOT 5 CLOSED

88250 avatar 88250 commented on May 28, 2024
编译pipi最新版本的错误

from pipe.

Comments (5)

88250 avatar 88250 commented on May 28, 2024

请通过 Go Modules 进行构建。

from pipe.

rts-gordon avatar rts-gordon commented on May 28, 2024

Hi @88250
环境:Windows 10版本,golang v1.14支持go mod;
问题:设置CGO_ENABLED=0出现错误:
go run main.go
opens database failed: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

后来改成CGO_ENABLED=1,出现错误:
go run main.go
github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

我已经在windows10上安装SQLite,仍旧有问题。还是pipe不支持windows下编译运行?谢谢。

from pipe.

88250 avatar 88250 commented on May 28, 2024
  • 我这里没有单独安装 SQLite
  • 支持 Windows 编译运行

from pipe.

rts-gordon avatar rts-gordon commented on May 28, 2024

谢谢,那这个错误该如何解决啊? 本机没有安装MYSQL,打算使用SQLite3.

go run master.go 或者./pipe.exe
D 2020/04/14 23:43:02 confs.go:183: configurations [&model.Configuration{Server:"http://localhost:5897", StaticServer:"http://localhost:5897", StaticResourceVersion:"1586060811337", LogLevel:"debug", ShowSQL:false, SessionSecret:"1TabWo9Y8jAhMVwqOPkVzMvFD9u1ISWn", SessionMaxAge:86400, RuntimeMode:"dev", SQLite:"C:\Users\Gordon/pipe.db", MySQL:"user:password@(localhost:3306)/pipe?charset=utf8mb4&parseTime=True&loc=Local&timeout=1s&readTimeout=16s&writeTimeout=16s", Port:"5897", AxiosBaseURL:"/api", MockServer:"http://localhost:8888"}]
D 2020/04/14 23:43:02 themes.go:43: loaded [7] themes
F 2020/04/14 23:43:02 db.go:44: opens database failed: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub
exit status 1

from pipe.

88250 avatar 88250 commented on May 28, 2024
Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

看样子是编译的时候需要打开 CGO_ENABLED=1

from pipe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.