wsl-ubuntu初见问题

linuxfatal error: stdio.h: 没有那个文件或目录

lsb_release -a查看Codename的值
sudo gedit /etc/apt/sources.list查看系统代号,修改为上面查看到的。
sudo apt-get update
sudo apt-get remove gcc卸载gcc
sudo apt-get install gcc重装gcc

No symbol table is loaded. Use the "file" command.

gcc编译的时候加上-g选项

安装pip

sudo apt-get install python-pip会报错
解决:sudo apt-get install python3-pip

安装cheat

解决:sudo python3 -m pip install cheat
新问题:cheatsheet是空的,于是改用github的项目安装cheat
解决:
git clone https://github.com/cheat/cheat
cd cheat
make

这里报错,缺少go,于是sudo apt-get install golang,然后重新make

解决:
go env -w GOPROXY=https://goproxy.cn,然后再次make

然后又报错

于是我又去看了一下Readme.md,发现应该从下面的链接下载安装
https://github.com/cheat/cheat/releases
我下载的是cheat-linux-amd64.gz
然后解压(我是用bandizip解压的)
然后用chmod添加执行权限并运行安装即可。

试一下查看find的作弊表

然后sudo python3 -m pip uninstall cheat,删除之前用Python3安装的cheat。

然后mv cheat-linux-amd64 cheat修改程序名

然后安装环境变量
sudo vi ~/.bashrc
在末尾添加export PATH="/home/sl1218/downloads/cheat-linux-amd64/:$PATH"
保存文件并退出
source ~/.bashrc
现在终于可以在任何地方使用cheat指令了!

cheat -e gcc添加修改自己的cheatsheet

命令行翻译工具translate-shell

使用sudo apt-get install translate-shell安装
trans :zh 'hello',使用冒号指定翻译成什么语言
trans -shell :zh 进入翻译终端,不用每次都输入命令才翻译

参考

gcc报错 fatal error: stdio.h: 没有那个文件
初次使用gdb调试器,出现的No symbol table is loaded. Use the "file" command.问题
解决go包管理代理网址无法访问:proxy.golang.org
linux添加环境变量
translate-shell 常用命令

原文地址:https://www.cnblogs.com/hardcoreYutian/p/13633749.html