ubuntu 開發環境搭建

1、修改163源(trusty)這個快

進入/etc/apt/目錄下,修改目錄下sources.list

命令:

cd /etc/apt/

sudo cp ./sources.list ./sources.list.ubuntu

sudo gedit ./sources.list

由於是sudo輸入密碼回車,以後有sudo的都需要。

下面是內容

deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

sudo apt-get update

2、五筆輸入法

sudo apt-get install fcitx-table-all

sudo apt-get install fcitx-table-wbpy

3、瀏覽器

sudo apt-get install chromium-browser

4、加速github

設置hosts

1. 登錄http://tool.chinaz.com/dns/

2. 查詢以下域名映射,並分別取訪問速度較快的一個ip

github.global.ssl.fastly.net   ->   151.101.229.194

assets-cdn.github.com        ->   151.101.229.194

3. 將查詢到的ip和域名設置到host中

1

sudo vim /etc/hosts

 在hosts中加入查詢結果

1

2

151.101.229.194 github.global.ssl.fastly.net

151.101.229.194 assets-cdn.github.com

 保存,退出,並重啓網絡

1

/etc/init.d/networking restart

 此時訪問網頁速度提升明顯

5、先下載nvidia官網驅動,按下面鏈接操作即可。

防黑屏

https://www.iewb.net/qg/3642.html

16.04

https://blog.csdn.net/xunan003/article/details/81665835

18.04

https://www.cnblogs.com/youpeng/p/10887346.html

6、切換python運行環境版本: 

install

# update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1

update-alternatives: using /usr/bin/python2.7 to provide /usr/bin/python (python) in auto mode

# update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2

update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode

remove

update-alternatives --remove python /usr/bin/python2.7

切換

update-alternatives --config python #切換命令

查看

update-alternatives --list python

7、修改path,

sudo gedit ~/.bashrc

保存後重啓終端

8、遠程桌面

https://mp.weixin.qq.com/s?src=11&timestamp=1579609181&ver=2110&signature=IXOn20LXQDMTHyslnpb9fvm75I3DNdF2NxULHcyWPFo9VdAZVJxD-QYlBG-u*Duf7gaJQR-ezC9OcH0Nx0yqLj-a5wG-FOe-E0vvxUnPindcEM2c*P8RaAbFAv1dgKea&new=1

9、CUDA安裝時錯誤

It appears that an X server is running. Please exit X before installation. If you're sure that X is not running, but are getting this error, please delete any X lock files in /tmp.

執行: sudo rm /tmp/.X0-lock

 

Installing the NVIDIA display driver... The driver installation is unable to locate the kernel source. Please make sure that the kernel source packages are installed and set up correctly. If you know that the kernel source packages are installed and set up correctly, you may pass the location of the kernel source with the '--kernel-source-path' flag.

3.解決辦法:

(1)install dkms:

sudo apt install dkms

opencv編譯:

https://blog.csdn.net/Mihu_Tutu/article/details/95042353

darknet:

https://blog.csdn.net/MacwinWin/article/details/84065062

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章