Я разработал приложение pygtk. Теперь мне нужно развернуть его на клиентской машине.Исполняемый файл, созданный в CentOS, не работающий в Ubuntu
Таким образом, я создал исполняемый файл с помощью PyInstaller в машине CentOS 5 (поскольку Pyinstaller зависит от glibc и для выбора нижнего glibc я использовал centOS 5).
Теперь, когда я пытаюсь запустить приложение в машине Ubuntu11.04, он загружает приложение, но вместо текста он отображает квадратные поля в графическом интерфейсе.
И следующие сообщения об ошибках печатаются в командной строке.
Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory
/tmp/_MEIwDbvRA/User.py:88: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
/tmp/_MEIwDbvRA/User.py:94: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
/tmp/_MEIwDbvRA/User.py:100: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
/tmp/_MEIwDbvRA/User.py:114: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
/tmp/_MEIwDbvRA/User.py:120: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
/tmp/_MEIwDbvRA/User.py:130: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
/tmp/_MEIwDbvRA/User.py:140: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
/tmp/_MEIwDbvRA/User.py:197: PangoWarning: No modules found:
No builtin or dynamically loaded modules were found.
PangoFc will not work correctly.
This probably means there was an error in the creation of:
'/home/arrowdevices/pda/etc/pango/pango.modules'
You should create this file by running:
pango-querymodules > '/home/arrowdevices/pda/etc/pango/pango.modules'
Fontconfig warning: "/etc/fonts/conf.d/11-lcd-filter-lcddefault.conf", line 9: invalid constant used : lcddefault
Fontconfig warning: "/etc/fonts/conf.d/53-monospace-lcd-filter.conf", line 17: invalid constant used : lcdlegacy
/tmp/_MEIwDbvRA/User.py:197: PangoWarning: failed to find shape engine, expect ugly output. engine-type='PangoRenderFc', script='latin'
/tmp/_MEIwDbvRA/User.py:197: PangoWarning: failed to find shape engine, expect ugly output. engine-type='PangoRenderFc', script='common'
/tmp/_MEIwDbvRA/User.py:197: GtkWarning: Cannot open pixbuf loader module file '/home/arrowdevices/pda/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache': No such file or directory
Мои вопросы:
- Как я могу аккуратно упаковать иконки и шрифты в исполняемый файл, созданный PyInstaller?
- Pyinstaller, кажется, является файлом жесткого кодирования в исполняемый файл. Как мы можем избежать этого?
Hi @ over-killer Я изменил вопросы, PLS посмотреть. Мне нужно аккуратно упаковать значки и шрифты с помощью pyinstaller. Я думаю, тогда не должно быть разницы между Ubuntu и CentOS – user2109788
Хорошо. Установите файлы разработки GTK +. Установите также PangoFC. Интересно, чтобы заставить его работать. Почему вы думаете, что между Ubuntu и CentOS нет различий? Ubuntu основан на Debian и CentOS основан на RHEL. Они используют разные менеджеры пакетов, а структура каталогов различна. –
Эй, я установил один и тот же centos 5 на другой машине и протестировал свое приложение, но оно дало ту же ошибку. Любая идея почему? – user2109788