一、蓝屏
以前还不知道,Ubuntu居然会蓝屏,这次见识了,网上搜索到的答案可用:
- 先进入字符界面:Ctrl + Alt + F4
- sudo apt-get install xserver-xorg-lts-utopic
- sudo dpkg-reconfigure xserver-xorg-lts-utopic reboot
- sudo dpkg --configure -a
二、g++编译有opencv的cpp引用错误
对‘cv::imread(cv::String const&, int)’未定义的引用;
对‘cv::Mat::zeros(int, int, int)’未定义的引用
对‘cv::String::allocate(unsigned long)’未定义的引用
对‘cv::String::deallocate()’未定义的引用
解决方法:
g++ test.cpp -o test pkg-config --libs --cflags opencv
-ldl
还有需要注意路径中最好是"/"这种斜杠或者“\”,否则可能找不到路径。
三、VitrualBox+Ubuntu18.04共享文件夹
- 首先进入virtualbox菜单 设备->安装增强功能
- virtualbox菜单,控制->设置->共享文件夹,选中windows中的文件夹,自动挂载、固定分配
- sudo mkdir /pcshare :在根目录下创建pcshare文件夹,用于安置共享文件
- sudo chmod 777 /pcshare:给定足够的权限
- sudo mount -t vboxsf gc-ransac /pcshare: 挂载,这里gc-ransac就是windows中的文件名称。
四、github太慢,修改hosts
sudo vi /etc/hosts
151.101.44.249 github.global.ssl.fastly.net
192.30.253.113 github.com
103.245.222.133 assets-cdn.github.com
23.235.47.133 assets-cdn.github.com
203.208.39.104 assets-cdn.github.com
204.232.175.78 documentcloud.github.com
204.232.175.94 gist.github.com
107.21.116.220 help.github.com
207.97.227.252 nodeload.github.com
199.27.76.130 raw.github.com
107.22.3.110 status.github.com
204.232.175.78 training.github.com
207.97.227.243 www.github.com
185.31.16.184 github.global.ssl.fastly.net
185.31.18.133 avatars0.githubusercontent.com
185.31.19.133 avatars1.githubusercontent.comsudo systemctl restart nscd
五、找不到共享库 libg2o_core.so: cannot open shared object file: No such file or directory
编辑如下文件:
sudo gedit /etc/ld.so.conf
文件中加入搜索路径:
/usr/local/lib
最后将修改写入缓存:
sudo ldconfig
六、简单安装cmake 3.11
https://blog.csdn.net/u012101561/article/details/80413627
七、Ubuntu 16.04 安装 OpenCV 3.3.1+ contrib
https://blog.csdn.net/PustoTauranth/article/details/89648438
八、make重定向
make > error.txt 2> &1
九、ubuntu14.04 can not access network and network hide
refer:https://www.cnblogs.com/fanyongbin/p/6500963.html
十、ubuntu14.04 安装了中文输入法不能输入中文
非常坑的bug被我碰到, 搞了很久没得到解决. 输入法配置一片空白, 不能选任何输入法, 后来找到解决方法. 解决方法: 删除 ~/.config/fcitx 文件夹, 重启即可.
cd ~/.config
sudo rm -rf fcitx
sudo reboot
十一、ubuntu 分屏terminator无法调起
1、可以切换到原始的gnom-terminator
sudo update-alternatives --config x-terminal-emulator
2、就是把/usr/bin/python连接到了Python3,但是terminator是基于Python2的。
sudo gedit /usr/bin/terminator
将
#!/usr/bin/python
改为
#!/usr/bin/python2
配色方案
[global_config]
always_split_with_profile = True
enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
focus = system
geometry_hinting = False
handle_size = 2
inactive_color_offset = 1.0
title_font = mry_KacstQurn Bold 11
title_hide_sizetext = True
title_receive_bg_color = "#729fcf"
[keybindings]
paste = <Primary>v
[layouts]
[[default]]
[[[child1]]]
parent = window0
profile = default
type = Terminal
[[[window0]]]
parent = ""
type = Window
[plugins]
[profiles]
[[default]]
background_color = "#3e3535"
background_darkness = 0.89
background_image = /home/peng/Pictures/pixiv/pixiv7/illust_10209207_20180121_090855.jpg
background_type = transparent
cursor_color = "#dcdcdc"
cursor_shape = underline
custom_command = tmux
font = Ubuntu Mono 13
foreground_color = "#ffffff"
login_shell = True
show_titlebar = False
urgent_bell = True
use_system_font = False
十二、切换python版本
alias python=’/usr/bin/python3’
alias python=’/usr/bin/python2.7’
十三、小明
https://gitithub.com/xm19/blob/master/en/
十四、make install 指定路径
make DESTDIR=/install/directory install
十五、ubuntu查询显卡型号
1)lspci | grep -i vga
2)将上述命令得到的16进制数复制到:http://pci-ids.ucw.cz/mods/PC/10de?action=help?help=pci
十六、OpenGL版本问题
error: GLSL 3.30 is not supported. Supported versions are: 1.10, 1.20,
1.30, 1.00 ES, and 3.00 ES
MESA_GL_VERSION_OVERRIDE=3.3 ./executor