使用的时候,请去掉.png
使用的时候,请去掉.png
树莓派启动Python脚本也是件让人头疼的事情,不符合Linux常理,简直了。
根据以往的做法,把需要执行的程序放入/etc/rc.local文件里。使用任何需要加的程序脚本都可以,唯独Python不行,气人。
通过解析报错原因,提示无法打开Python,猜测跟权限有关,各种尝试,都无效。
通过网上资料,说明可以通过desktop来启动程序,这话我信了,没有不信的理由了。尝试在./config目录下创建 autostart 文件夹,并在里面创建了第一个启动配置文件mystart.desktop。别说还真好使,但请注意权限问题。
[Desktop Entry]
Name=ScanTest
Comment=My Python Program
Exec=sudo python3 /home/pi/tes.py
#Icon=/home/pi/ScanTest/Scan.png
Terminal=false
MultipleArgs=false
Type=Application
Categories=Application;Development;
StartupNotify=true
根据电脑操作系统位数选在不同的安装包,点击下载。
根据提示选择安装目录,根据实际情况选择,建议默认。
根据以上猛如虎的操作,cygwin算是安装完成,但是make等一些操作还是无法完成。
安装wget并添加了环境变量后,cygwin需要重新打开才能找到wget
上面wget和apt-cyg 弄好后 , cygwin64 应用终端输入命令 make 发现make 命令 找不到,用apt-cyg安装 相关包
apt-cyg install gcc
apt-cyg install glibc-dev
apt-cyg install automake
apt-cyg install make
安装完后,make 能用了
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
*** Default configuration is based on 'sandbox_defconfig'
make[4]: Leaving directory '/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10'
make -C /opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10 tools-only HOSTCFLAGS="-I/opt/Tina_rel/tina/out/host/include -I/opt/Tina_rel/tina/out/host/usr/include -O2 -I/opt/Tina_rel/tina/out/host/include -I/opt/Tina_rel/tina/out/host/usr/include " HOSTLDFLAGS="-L/opt/Tina_rel/tina/out/host/lib -L/opt/Tina_rel/tina/out/host/usr/lib "
make[4]: Entering directory '/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10'
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
GEN include/autoconf.mk
In file included from include/linux/compiler.h:54:0,
from /opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10/arch/sandbox/include/asm/bitops.h:20,
from include/linux/bitops.h:110,
from /opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10/include/common.h:20:
include/linux/compiler-gcc.h:114:1: fatal error: linux/compiler-gcc7.h: No such file or directory
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10/scripts/Makefile.autoconf:64: recipe for target 'include/autoconf.mk' failed
make[6]: *** [include/autoconf.mk] Error 1
/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10/Makefile:464: recipe for target 'silentoldconfig' failed
make[5]: *** [silentoldconfig] Error 1
make[4]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'. Stop.
make[4]: Leaving directory '/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10'
Makefile:46: recipe for target '/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10/.built' failed
make[3]: *** [/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/u-boot-2014.10/.built] Error 2
make[3]: Leaving directory '/opt/Tina_rel/tina/tools/mkimage'
tools/Makefile:138: recipe for target 'tools/mkimage/compile' failed
make[2]: *** [tools/mkimage/compile] Error 2
make[2]: Leaving directory '/opt/Tina_rel/tina'
tools/Makefile:137: recipe for target '/opt/Tina_rel/tina/out/violin-F1C200s/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy' failed
make[1]: *** [/opt/Tina_rel/tina/out/violin-F1C200s/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2
make[1]: Leaving directory '/opt/Tina_rel/tina'
/opt/Tina_rel/tina/build/toplevel.mk:275: recipe for target 'world' failed
make: *** [world] Error 2
#### make failed to build some targets (03:04 (mm:ss)) ####
cp ./out/violin-F1C200s/compile_dir/host/u-boot-2014.10/include/linux/compiler-gcc5.h ./out/violin-F1C200s/compile_dir/host/u-boot-2014.10/include/linux/compiler-gcc7.h
make[3]: Entering directory '/opt/Tina_rel/tina/tools/automake'
(cd /opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/automake-1.15; AUTOM4TE=/opt/Tina_rel/tina/out/host/bin/autom4te AUTOCONF=/opt/Tina_rel/tina/out/host/bin/autoconf AUTOMAKE=/opt/Tina_rel/tina/out/host/bin/automake ACLOCAL=/opt/Tina_rel/tina/out/host/bin/aclocal AUTOHEADER=/opt/Tina_rel/tina/out/host/bin/autoheader LIBTOOLIZE=/opt/Tina_rel/tina/out/host/bin/libtoolize LIBTOOL=/opt/Tina_rel/tina/out/host/bin/libtool M4=/opt/Tina_rel/tina/out/host/bin/m4 AUTOPOINT=true STAGING_DIR_HOST="" ./bootstrap.sh)
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at ./bin/automake.tmp line 3938.
Makefile:50: recipe for target '/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/automake-1.15/.configured' failed
make[3]: *** [/opt/Tina_rel/tina/out/violin-F1C200s/compile_dir/host/automake-1.15/.configured] Error 255
make[3]: Leaving directory '/opt/Tina_rel/tina/tools/automake'
tools/Makefile:138: recipe for target 'tools/automake/compile' failed
make[2]: *** [tools/automake/compile] Error 2
make[2]: Leaving directory '/opt/Tina_rel/tina'
tools/Makefile:137: recipe for target '/opt/Tina_rel/tina/out/violin-F1C200s/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy' failed
make[1]: *** [/opt/Tina_rel/tina/out/violin-F1C200s/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2
make[1]: Leaving directory '/opt/Tina_rel/tina'
/opt/Tina_rel/tina/build/toplevel.mk:275: recipe for target 'world' failed
make: *** [world] Error 2
#### make failed to build some targets (32 seconds) ####
修改 ./out/violin-F1C200s/compile_dir/host/automake-1.15/bin/automake.in 3883 行
$text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
改为:
$text =~ s/\$[{]([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;
diff --git a/glib/glib/gdate.c b/glib/glib/gdate.c
index 1978cf7..9be9b97 100644
--- a/glib/glib/gdate.c
+++ b/glib/glib/gdate.c
#第一处:2439行修改
@@ -2439,6 +2439,10 @@ win32_strftime_helper (const GDate *d,
*
* Returns: number of characters written to the buffer, or 0 the buffer was too small
*/
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
+
gsize
g_date_strftime (gchar *s,
gsize slen,
#第二处:2549行修改
@@ -2549,3 +2553,5 @@ g_date_strftime (gchar *s,
return retval;
#endif
}
+
+#pragma GCC diagnostic pop
解决方法很简单:
进入源码中glib目录
我的是
cd build_dir/host/pkg-config-0.29.2/glib
./configure --enable-iconv=no --with-libiconv=gnu
回到源码根目录继续编译吧
1.whereis 文件名
特点:快速,但是是模糊查找
例如:
whereis php #会把php,php.ini,php.*所在的目录都找出来.
2.find / -name 文件名
特点:准确,但速度慢,消耗资源大
例如:
如果想找到php.ini的准确位置,需要用
#find / -name php.ini
3.locate 文件名
最快,最好的方法.
注意:第一次使用该命令,可能需要更新数据库,按照提示的命令执行一下就好了.
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /home/recologypower/f1c200s/C200S_Linux_V0.1/out/sunivw1p1/linux/common/buildroot/host/usr/bin/automake line 4113.
autoreconf: /home/recologypower/f1c200s/C200S_Linux_V0.1/out/sunivw1p1/linux/common/buildroot/host/usr/bin/automake failed with exit status: 255
staging_dir/host/bin/automake的4113行报错
因为新版的perl不在支持左大括号的使用,
进入这个文件删掉大括号,问题解决。