主题 : setqt4env错误如何解决啊 谢谢大牛 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 73530
精华: 0
发帖: 44
金钱: 225 两
威望: 45 点
综合积分: 88 分
注册时间: 2012-07-10
最后登录: 2014-09-03
楼主  发表于: 2013-05-23 22:53

 setqt4env错误如何解决啊 谢谢大牛

[root@FriendlyARM /]# chmod +x /bin/setqt4env
[root@FriendlyARM /]# . setqt4env
-/bin/sh: /bin/setqt4env: -e: not found
-/bin/sh: /bin/setqt4env: -c: not found



if( -e /etc/friendlyarm-ts-input.conf);then
        ./etc/friendlyarm-ts-input.conf
fi
true ${TSLIB_TSDEVICE:=/dev/touchscreen}
TSLIB_CONFFILE=/etc/ts.conf
export TSLIB_TSDEVICE
export TSLIB_CONFFILE
export TSLIB_PLUGINDIR=/usr/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_DISPLAY=:1
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin
if( -c /dev/touchscreen);then
        export QWS_MOUSE_PROTO="Tslib MouseMan:/dev/input/mice"
        if( ! -s /etc/pointercal);then
                rm /etc/pointercal
                /usr/bin/ts_calibrate
fi
else
        export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
fi
export QWS_KEYBOARD=TTY:/dev/tty1
export HOME=/root
级别: 新手上路
UID: 73530
精华: 0
发帖: 44
金钱: 225 两
威望: 45 点
综合积分: 88 分
注册时间: 2012-07-10
最后登录: 2014-09-03
1楼  发表于: 2013-05-30 22:59
看样子还是我最近来解决这个问题吧,估计是格式不对,我想了一个方法,在/bin/文件中使用ls你可以看一个文件名为qt4的,这个文件就是我们跑例程用到的那个在终端中输入qt4将会派qt4的example,其实就是在这个setqt4env的最后多加了两句,分别是打开路径,和执行的程序,可以改成自己的路径和程序名,是同样的作用。
级别: 新手上路
UID: 57066
精华: 0
发帖: 37
金钱: 185 两
威望: 37 点
综合积分: 74 分
注册时间: 2011-10-18
最后登录: 2018-07-04
2楼  发表于: 2013-07-22 10:40
请问具体你是如何解决的??我也遇上这样的问题
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2013-07-22 11:06
正确的语法格式应该是
复制代码
  1. if [ -e /etc/friendlyarm-ts-input.conf ];then
  2.         ./etc/friendlyarm-ts-input.conf
  3. fi
  4. true ${TSLIB_TSDEVICE:=/dev/touchscreen}
  5. TSLIB_CONFFILE=/etc/ts.conf
  6. export TSLIB_TSDEVICE
  7. export TSLIB_CONFFILE
  8. export TSLIB_PLUGINDIR=/usr/lib/ts
  9. export TSLIB_CALIBFILE=/etc/pointercal
  10. export QWS_DISPLAY=:1
  11. export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
  12. export PATH=/bin:/sbin:/usr/bin/:/usr/sbin:/usr/local/bin
  13. if [ -c /dev/touchscreen ];then
  14.         export QWS_MOUSE_PROTO="Tslib MouseMan:/dev/input/mice"
  15.         if [ ! -s /etc/pointercal ];then
  16.                 rm /etc/pointercal
  17.                 /usr/bin/ts_calibrate
  18.         fi
  19. else  
  20.         export QWS_MOUSE_PROTO="MouseMan:/dev/input/mice"
  21. fi
  22. export QWS_KEYBOARD=TTY:/dev/tty1
  23. export HOME=/root
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 63868
精华: 0
发帖: 56
金钱: 280 两
威望: 56 点
综合积分: 112 分
注册时间: 2012-02-25
最后登录: 2015-04-28
4楼  发表于: 2014-06-12 16:42
./etc/friendlyarm-ts-input.conf
问题在这一行,./之间有一个空格,也就是. /,亲自试验过的,改了就可以用