准备工作 下载 Golang 从官方网站下载并安装 Go 语言, 按默认设置安装即可。 安装npm和pnpm(版本要求npm>22) Clone Answer 项目 确保你已经克隆了 Apache Answer 到本地,如还未克隆,请阅读 Apache Answer 前端配置指南。 一、后端编译和初始化 在 Answer 项目根目录打开命令行终端运行以下命令。 go mod download
go run cmd/answer/main.go init -C ./answer-data
go run cmd/answer/main.go run -C ./answer-data如果报端口占用错误就修改/answer/internal/install/install_main.go文件端口 加入版本号编译 cd cmd/answer
go build -ldflags "-X github.com/apache/answer/internal/base/constant.Version=1.5.1 -X github.com/apache/answer/internal/ba
E: Malformed entry 60 in list file /etc/apt/sources.list (Component)
E: The list of sources could not be read.
在阿里云上添加了Docker官方的下载源后,升级包(apt-get update)报出如上的错误.
没办法只好注释掉了其中的一个源路径:
deb [arch=amd64] https://download.docker.com/linux/ubuntu stable
只留下了:
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable
再次更新源不再报错.