Pratical Training Memo(Ubuntu14.04)
文章目录
安装谷歌输入法
sudo apt-get update
sudo apt-get install fcitx-googlepinyin
# 配置Fcitx
# 设置->区域与语言->管理已安装的语言
# 语言支持->语言->键盘输入法系统:(IBus->fcitx)
sudo reboot
fcitx-configtool
sudo reboot
安装 Visual Studio Code
# 方法1:
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake ide visual-studio-code
# 方法2:
# 下载deb安装包
sudo dpkg -i code_1.31.1-1549938243_amd64.deb
- 错误描述: Can’t find the relationship
在处理时有错误发生:
code
- 解决方案
sudo apt-get -f install
安装 arm-linux-gcc 交叉编译器
bash: /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc: 没有那个文件或目录
# 解压缩
sudo tar xvzf arm-linux-gcc-4.5.1-v6-vfp-20101103.tgz -C /
# dr_hayden@VEGA:~$下
vim .bashrc
# 行尾添加:
####arm-linux-gcc
export PATH=/opt/FriendlyARM/toolschain/4.5.1/bin:$PATH
source .bashrc
# bash: /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc: 没有那个文件或目录
sudo apt-get install lsb-core
sudo apt-get install g++-multilib
arm-linux-gcc -v
- 错误描述: Can’t print the version of arm-linux-gcc
arm-linux-gcc -v
-bash: /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc: 没有那个文件或目录
- 解决方案
sudo apt-get install lsb-core
安装 tslib
sudo mv tslib-1.4.tar.gz /opt
sudo tar zxvf tslib-1.4.tar.gz
cd tslib/
sudo ./autogen.sh
sudo ./configure --prefix=/usr/local/tslib --host=arm-linux ac_cv_func_malloc_0_nonnull=yes
sudo make
sudo make install
- 错误描述: Can’t execute autogen.sh
./autogen.sh
./autogen.sh: 4: ./autogen.sh: autoreconf: not found
- 解决方案
sudo apt-get install autoconf automake libtool
- 错误描述:在make时出错
- 提示
In function ‘open’,
inlined from ‘main’ at ts_calibrate.c:229:11:
/usr/include/bits/fcntl2.h:51:24: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make[2]: *** [ts_calibrate.o] Error 1
解决方法:
这是因为open函数的语法不符合最新的gcc,在/tests/ts_calibrate.c中加入open的第三个参数0777:
if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
cal_fd = open (calfile, O_CREAT | O_RDWR, 0777);
} else {
cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR, 0777);
}
安装Qt Creator
./qt-creator-linux-x86_64-opensource-2.5.2.bin
安装Qt库源码
tar zxvf qt-everywhere-opensource-src-4.8.5.tar.gz
sudo cp -r qt-everywhere-opensource-src-4.8.5/ /usr/local/
sudo cd /usr/local/
sudo mv qt-everywhere-opensource-src-4.8.5/ qt-pc
cd /home/dr_hayden/Program/Training/
sudo cp -r qt-everywhere-opensource-src-4.8.5/ /usr/local/
sudo mv qt-everywhere-opensource-src-4.8.5/ qt-arm
qt-pc
sudo ./configure
# Basic XLib functionality test failed!
sudo apt-get install libx11-dev libxext-dev libxtst-dev
sudo ./configure
sudo make
sudo make install
- 错误描述: Basic XLib Error
sudo ./configure
Basic XLib functionality test failed!
- 解决方案
sudo apt-get install libx11-dev libxext-dev libxtst-dev
qt-arm
sudo vim /usr/local/qt-arm/mkspecs/qws/linux-arm-g++/qmake.conf
#对文件中内容覆盖
# modifications to g++.conf
QMAKE_CC = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-gcc -lts
QMAKE_CXX = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++ -lts
QMAKE_LINK = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++ -lts
QMAKE_LINK_SHLIB = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-g++ -lts
# modifications to linux.conf
QMAKE_AR = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-ar cqs
QMAKE_OBJCOPY = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-objcopy
QMAKE_STRIP = /opt/FriendlyARM/toolschain/4.5.1/bin/arm-linux-strip
sudo ./configure -prefix /usr/local/Trolltech/QtEmbedded-4.8.5-arm -opensource -confirm-license -release -shared -embedded arm -xplatform qws/linux-arm-g++ -depths 16,18,24 -fast -optimized-qmake -pch -qt-sql-sqlite -qt-libjpeg -qt-zlib -qt-libpng -qt-freetype -little-endian -host-little-endian -no-qt3support -no-libtiff -no-libmng -no-opengl -no-mmx -no-sse -no-sse2 -no-3dnow -no-openssl -no-webkit -no-qvfb -no-phonon -no-nis -no-opengl -no-cups -no-glib -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-pch -no-separate-debug-info -nomake examples -nomake tools -nomake docs -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib
sudo make
sudo make install