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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值