wsl ubuntu初見問題

2022-06-21 21:06:13 字數 2154 閱讀 5225

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

這裡報錯,缺少go,於是sudo apt-get install golang,然後重新make

解決:go env -w goproxy=,然後再次make

然後又報錯

然後解壓(我是用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 常用命令

筆記 WSL Ubuntu 安裝手記

之前安裝了雙系統,見 windows10 ubuntu 雙系統安裝手記,ubuntu更改手記。用了一段時間之後,發現純 ubuntu 並不如想象中的那麼美好,有很多東西都得切回 windows 來使用,而兩者切換就必須重啟電腦,很麻煩,所以考慮一下 wsl。最好的教程當然是官網文件 適用於 linu...

WSL Ubuntu安裝中文語言

安裝中文語言包 sudo apt install language pack zh hans執行dpkg reconfigure localessudo dpkg reconfigure locales選擇en us.utf 8和zh cn.utf 8,選擇zh cn.utf 8為預設語言 安裝字型...

初見PHP反射

什麼是反射?指在php執行狀態中,擴充套件分析php程式,匯出或提取出關於這個類的方法 屬性 引數 注釋等資訊。通俗來說就是獲取該類的資訊,至於你要獲取來幹嘛,這個就看你自己的需求了。下面是乙個小例子 class test public function del public function se...