1. xshell+xmanager
本想安装win7+ubuntu的双系统,但是安装后开机系统引导出现问题,只能看到一个系统。听说还需要下载修复软件处理它,我已经被引导问题搞怕了,上一个硬盘就莫名其妙的坏了,所以这次就安分的把linux放在虚拟机中吧。但是在虚拟机中始终有一些不舒服,于是使用xshell+xmanager的组合方式在主机上进行linux的操作。
xshell使用ssh登陆就不多说了,想要用xmanager展示窗口程序,那么我们需要对xshell的部分属性进行设置。文件——属性——ssh——隧道——x11转移——转发x11连接到X DISPALY(D): localhost: 0.0 (有的情况下换成 xmanager)
2. xshell远程登陆的时间
修改/etc/ssh/sshd_config配置文件 ClientAliveInterval 120(秒,或者更长的时间),
重载,service sshd reload
3. 构造简单的ubuntu java环境
sudo apt-get install default-jre
修改配置文件
装eclipse: sudo apt-get install eclipse
4. 构建eclipse C/C++的开发环境
eclipse版本: 3.8.1
cdt代理: http://download.eclipse.org/tools/cdt/releases/galileo
(也许,你需要:http://download.eclipse.org/tools/cdt/releases/helios 版本)
安装:help – install new software – work with,add – 填写相关的东西。
选择:
5. win7显示文件的后缀名
alt – 工具 – 文件夹选项 – 查看 – 高级设置 – 隐藏已知文件类型的拓展名(去掉)
6. ssh登陆自动断开的解决:
在/etc/ssh/ssh_config的末尾添加设置:
ClientAliveInterval 300
7. ubuntu配置retext:
设置数学公式:
Installing MathJax
1. In Debian-based systems (such as Ubuntu or Mint), all you should do is
sudo apt-get install libjs-mathjax
2. Enabling WebKit mode
Math in ReText will work only when using WebKit renderer. To enable it, use "Edit → Use WebKit renderer"
添加语法高亮
sudo apt-get install python-pygments
在Markdown extensions框里添加字段:codehilite
ReText的编辑——首选项——Markdown extensions下填写codehilite,mathjax
8. 移动设备连接linux后的表现:
新连接移动设备的名称:/dev/sdb
for U盘:
edemon@ubuntu1:/dev$ sudo fdisk -l
.....
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2046 41601023 41598978 19.9G 5 Extended
/dev/sda5 2048 41601023 41598976 19.9G 83 Linux
.....
for 移动硬盘:
edemon@ubuntu1:/dev$ sudo fdisk -l
.....
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2046 41601023 41598978 19.9G 5 Extended
/dev/sda5 2048 41601023 41598976 19.9G 83 Linux
.....
9. 与linux主机名相关的文件(CentOS)
/etc/sysconfig/network
10. ubuntu上拼音输入法fcitx的安装
sudo apt-get install fcitx-libpinyin
11. vmvare tools for CentOS
12 qt、qt-creator在CentOS上的安装
wget http://mirrors.hustunique.com/qt/official_releases/qtcreator/3.1/3.1.2/qt-creator-opensource-linux-x86-3.1.2.run
赋予其可执行属性,然后执行它即可。
$ pwd
/home/edemon/Qt5.1.1/Tools/QtCreator/bin
$ ./qtcreator
Failed to load core: /home/edemon/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/libCore.so: Cannot load library
/home/edemon/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/libCore.so: (/usr/lib/libstdc++.so.6: version
`GLIBCXX_3.4.15' not found (required by
/home/edemon/Qt5.1.1/Tools/QtCreator/lib/qtcreator/plugins/QtProject/../.././libQt5CLucene.so.5))
gcc的安装目录:
$ which gcc
/usr/bin/gcc
strings /usr/bin/gcc/libstdc++so.6 | grep GLIBC
没有??
查看gcc版本:
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR
升级gcc:
wget http://gcc.skazkaforyou.com/releases/gcc-4.9.1/gcc-4.9.1.tar.gz
./contrib/download_prerequisites
下载安装依赖库
./configure
make
make
需要注意的是:../configure --prefix=/usr/local/gcc-4.7 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0 --with-mpc=/usr/local/mpc-0.9
应修改为:../configure --prefix=/usr/local/GCC-4.9 --enable-threads=posix --disable-checking --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-5.0.1 --with-mpfr=/usr/local/mpfr-3.1.0 --with-mpc=/usr/local/mpc-0.9
然后才有后面的vim /etc/profile
添加PATH=/usr/local/GCC-4.9/bin:$PATH
接下来,查看gcc的安装目录
# which gcc
/usr/local/GCC-4.9/bin/gcc
在lib中找到文件libstdc++.so.6
# ls /usr/local/GCC-4.9/lib |grep libstdc++.so.
libstdc++.so.6
libstdc++.so.6.0.20
libstdc++.so.6.0.20-gdb.py
# cd /usr/local/GCC-4.9/lib
strings libstdc++.so.6 |grep GLIBC
发现有GLIBCXX_3.4.15
存在。
然后将其复制到/usr/lib中
启动运行简单的UI程序。
/home/edemon/Qt5.1.1/Tools/QtCreator/bin/qtcreator
如果出现 cannot find -lGL
yum install libGL libGL-devel
标签:gcc,--,重装系统,libstd,c++,杂记,usr,local From: https://blog.51cto.com/u_15746559/5748427