linux终端游戏编程,GitHub - zhaodianbo/richman: 一个Linux终端的大富翁游戏,C语言编程练习...
时间: 2024-06-02 12:12:33 浏览: 11
这个项目看起来很有趣!它是一个在Linux终端上运行的大富翁游戏,使用C语言编写。如果你想练习Linux编程、C语言编程以及游戏开发技能,这个项目可能很适合你。
通过在终端上运行游戏,你可以学习如何在Linux环境下使用C编写控制台应用程序。此外,你还可以学习如何设计游戏逻辑和游戏界面。你也可以通过阅读代码和提交自己的修改来学习如何使用Git进行版本控制。
总之,如果你喜欢编程和游戏开发,并且想要提高自己的技能,这个项目是值得一试的。
相关问题
go: finding module for package github.com/gin-gonic/gin go: found github.com/gin-gonic/gin in github.com/gin-gonic/gin v1.9.
根据你提供的引用内容可以看出,你遇到了一个关于安装gin包的问题。错误提示是"cannot find module providing package github.com/gin-gonic/gin"。这个错误通常是因为没有正确配置go mod或者网络问题导致无法下载gin包。你可以尝试以下解决方法:
1. 设置代理:
- 对于mac/linux系统,执行以下命令:
```
export GOPROXY=https://goproxy.io
export GO111MODULE=on
```
- 对于windows系统,执行以下命令(注意需要加上引号):
```
go env -w GOPROXY="https://goproxy.io"
go env -w GO111MODULE="on"
```
2. 执行以下命令以初始化和编辑go.mod文件:
```
go mod init gin
go mod edit -require github.com/gin-gonic/gin@latest
```
通过以上步骤,你应该能够成功解决找不到gin包的问题。
linux报错:env GO111MODULE=on go run build/ci.go install build/ci.go:55:2: cannot find package "github.com/cespare/cp" in any of: /usr/local/go/src/github.com/cespare/cp (from $GOROOT) /root/go/src/github.com/cespare/cp (from $GOPATH) build/ci.go:56:2: cannot find package "github.com/ethereum/go-ethereum/common" in any of: /usr/local/go/src/github.com/ethereum/go-ethereum/common (from $GOROOT) /root/go/src/github.com/ethereum/go-ethereum/common (from $GOPATH) build/ci.go:57:2: cannot find package "github.com/ethereum/go-ethereum/crypto/signify" in any of: /usr/local/go/src/github.com/ethereum/go-ethereum/crypto/signify (from $GOROOT) /root/go/src/github.com/ethereum/go-ethereum/crypto/signify (from $GOPATH) build/ci.go:58:2: cannot find package "github.com/ethereum/go-ethereum/internal/build" in any of: /usr/local/go/src/github.com/ethereum/go-ethereum/internal/build (from $GOROOT) /root/go/src/github.com/ethereum/go-ethereum/internal/build (from $GOPATH) build/ci.go:59:2: cannot find package "github.com/ethereum/go-ethereum/params" in any of: /usr/local/go/src/github.com/ethereum/go-ethereum/params (from $GOROOT) /root/go/src/github.com/ethereum/go-ethereum/params (from $GOPATH) make: *** [all] Error 1
这是因为你的环境变量设置不正确或者缺少相关依赖包。建议你按照以下步骤操作:
1. 确认你是否已经安装了相关的依赖包。可以使用以下命令进行安装:
```
go get -u github.com/cespare/cp
go get -u github.com/ethereum/go-ethereum/common
go get -u github.com/ethereum/go-ethereum/crypto/signify
go get -u github.com/ethereum/go-ethereum/internal/build
go get -u github.com/ethereum/go-ethereum/params
```
2. 确认你的环境变量设置是否正确。你可以使用以下命令查看你的环境变量:
```
echo $GOPATH
echo $GOROOT
```
其中 `$GOPATH` 表示你的 `go` 项目所在目录,`$GOROOT` 表示 `go` 的安装路径。如果这些变量没有设置或者设置不正确,你需要重新设置它们。
3. 如果你的 `go` 版本较老,可以考虑升级到最新版。你可以使用以下命令进行升级:
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install golang
```
升级后,你需要重新设置环境变量。
通过以上步骤的操作,你应该可以解决这个问题。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)