Ubuntu16.04使用问题

一、蓝屏

以前还不知道,Ubuntu居然会蓝屏,这次见识了,网上搜索到的答案可用:

  1. 先进入字符界面:Ctrl + Alt + F4
  2. sudo apt-get install xserver-xorg-lts-utopic
  3. sudo dpkg-reconfigure xserver-xorg-lts-utopic reboot
  4. 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共享文件夹
  1. 首先进入virtualbox菜单 设备->安装增强功能
  2. virtualbox菜单,控制->设置->共享文件夹,选中windows中的文件夹,自动挂载、固定分配
  3. sudo mkdir /pcshare :在根目录下创建pcshare文件夹,用于安置共享文件
  4. sudo chmod 777 /pcshare:给定足够的权限
  5. 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.com

sudo 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

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Researcher-Du

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值