deepin-autotest-framework icon indicating copy to clipboard operation
deepin-autotest-framework copied to clipboard

使用ubuntu24.04初始化环境报错

Open wang-qa opened this issue 1 year ago • 2 comments

环境

软件信息:

  • 固件版本: 6.00
  • 操作系统名称: Ubuntu 24.04.2 LTS
  • 操作系统内部版本: (null)
  • 操作系统类型: 64 位
  • GNOME 版本: 46
  • 窗口系统: Wayland
  • 内核版本: Linux 6.11.0-21-generic
  • python : 3.12

报错内容:

  1. 软件包 qt5-default 没有可安装候选
  2. wayland_autotool 安装失败 ×

libqt5gui5 安装成功 √ 已安装:(无) libqt5core5a 安装成功 √ 已安装:(无)

版本为 libqt5gui5t64、libqt5core5t64

  1. python导包报失败
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录
/home/ubutnu/my_project/src/cmdctl.py:160: SyntaxWarning: invalid escape sequence '\-'
  "grep -v daemon | grep -v '\-d'"
/home/ubutnu/my_project/src/depends/pyautogui/_pyautogui_x11.py:270: SyntaxWarning: invalid escape sequence '\e'
  '\e': _display.keysym_to_keycode(Xlib.XK.string_to_keysym('Escape')),
Traceback (most recent call last):
  File "/home/ubutnu/my_project/manage.py", line 106, in <module>
    Manage()
  File "/home/ubutnu/my_project/manage.py", line 36, in __init__
    from src.plugins.mng import trim
  File "/home/ubutnu/my_project/src/__init__.py", line 25, in <module>
    from src.assert_common import AssertCommon as AssertCommon
  File "/home/ubutnu/my_project/src/assert_common.py", line 16, in <module>
    from src.mouse_key import MouseKey
  File "/home/ubutnu/my_project/src/mouse_key.py", line 32, in <module>
    from src.depends.pyautogui import _pyautogui_wayland as pyautogui
  File "/home/ubutnu/my_project/src/depends/pyautogui/_pyautogui_wayland.py", line 29, in <module>
    Point = collections.namedtuple("Point", "x y")
            ^^^^^^^^^^^
NameError: name 'collections' is not defined. Did you forget to import 'collections'
完整log如下
ubutnu@ubutnu-VMware-Virtual-Platform:~/my_project$ bash env.sh 
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录

 ██╗   ██╗  ██████╗      ███████╗ ███╗   ██╗ ██╗   ██╗
 ╚██╗ ██╔╝ ██╔═══██╗     ██╔════╝ ████╗  ██║ ██║   ██║
  ╚████╔╝  ██║   ██║     █████╗   ██╔██╗ ██║ ██║   ██║
   ╚██╔╝   ██║▄▄ ██║     ██╔══╝   ██║╚██╗██║ ╚██╗ ██╔╝
    ██║    ╚██████╔╝     ███████╗ ██║ ╚████║  ╚████╔╝
    ╚═╝     ╚══▀▀═╝      ╚══════╝ ╚═╝  ╚═══╝   ╚═══╝
    2.14.0 -> 172.16.23.129 

命中:1 http://security.ubuntu.com/ubuntu noble-security InRelease                                                                 
命中:2 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble InRelease                                                     
命中:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease        
命中:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease
命中:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
有 1 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。
python3-pip	安装成功 √
python3-tk	安装成功 √
scrot	安装成功 √
openjdk-11-jdk-headless	安装成功 √
gir1.2-atspi-2.0	安装成功 √
libatk-adaptor	安装成功 √
at-spi2-core	安装成功 √
python3-opencv	安装成功 √
g++	安装成功 √
  已安装:4:13.2.0-7ubuntu1
build-essential	安装成功 √
  已安装:12.10ubuntu1
cmake	安装成功 √
  已安装:3.28.3-1build7
qt5-default	安装失败 ×

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

正在读取软件包列表...
正在分析软件包的依赖关系树...
正在读取状态信息...
没有可用的软件包 qt5-default,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到

E: 软件包 qt5-default 没有可安装候选
  已安装:(无)
qt5-qmake	安装成功 √
  已安装:5.15.13+dfsg-1ubuntu1
libqt5gui5	安装成功 √
  已安装:(无)
libqt5core5a	安装成功 √
  已安装:(无)
wl-clipboard	安装成功 √
  已安装:2.2.1-1build1

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libkf5wayland-dev	安装成功 √
wayland_autotool 安装失败 ×
cat: /usr/share/deepin-elf-verify/whitelist: 没有那个文件或目录
sed: 无法读取 /usr/share/deepin-elf-verify/whitelist: 没有那个文件或目录
白名单/usr/share/deepin-elf-verify/whitelist写入失败
Failed to restart deepin-elf-verify.service: Unit deepin-elf-verify.service not found.
pipenv	安装成功 √
pyscreeze==0.1.28	安装成功 √
PyAutoGUI==0.9.53	安装成功 √
pytest==6.2.5	安装成功 √
pytest-rerunfailures==10.2	安装成功 √
pytest-timeout==2.1.0	安装成功 √
allure-pytest==2.9.45	安装成功 √
funnylog	安装成功 √
funnylog              2024.5.24
pdocr-rpc	安装成功 √
pdocr-rpc             2024.5.28
image-center	安装成功 √
image-center          2024.6.5
allure-custom	安装成功 √
allure-custom         2024.5.24
auto_uos	安装失败 ×
Looking in indexes: http://10.20.54.182:8081, https://pypi.tuna.tsinghua.edu.cn/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPConnection object at 0x75958d8d7b30>, 'Connection to 10.20.54.182 timed out. (connect timeout=15)')': /auto-uos/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPConnection object at 0x75958d706690>, 'Connection to 10.20.54.182 timed out. (connect timeout=15)')': /auto-uos/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPConnection object at 0x75958d706ae0>, 'Connection to 10.20.54.182 timed out. (connect timeout=15)')': /auto-uos/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPConnection object at 0x75958d706a50>, 'Connection to 10.20.54.182 timed out. (connect timeout=15)')': /auto-uos/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPConnection object at 0x75958d706f90>, 'Connection to 10.20.54.182 timed out. (connect timeout=15)')': /auto-uos/
ERROR: Could not find a version that satisfies the requirement auto_uos (from versions: none)
ERROR: No matching distribution found for auto_uos
WARNING: Package(s) not found: auto_uos
cp: 对 '/auto_uos' 调用 stat 失败: 没有那个文件或目录
chmod: 无法访问 '/home/ubutnu/my_project/public': 没有那个文件或目录
/home/ubutnu/my_project/.venv
Creating a Pipfile for this project...
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录
/home/ubutnu/my_project/src/cmdctl.py:160: SyntaxWarning: invalid escape sequence '\-'
  "grep -v daemon | grep -v '\-d'"
/home/ubutnu/my_project/src/depends/pyautogui/_pyautogui_x11.py:270: SyntaxWarning: invalid escape sequence '\e'
  '\e': _display.keysym_to_keycode(Xlib.XK.string_to_keysym('Escape')),
Traceback (most recent call last):
  File "/home/ubutnu/my_project/manage.py", line 106, in <module>
    Manage()
  File "/home/ubutnu/my_project/manage.py", line 36, in __init__
    from src.plugins.mng import trim
  File "/home/ubutnu/my_project/src/__init__.py", line 25, in <module>
    from src.assert_common import AssertCommon as AssertCommon
  File "/home/ubutnu/my_project/src/assert_common.py", line 16, in <module>
    from src.mouse_key import MouseKey
  File "/home/ubutnu/my_project/src/mouse_key.py", line 32, in <module>
    from src.depends.pyautogui import _pyautogui_wayland as pyautogui
  File "/home/ubutnu/my_project/src/depends/pyautogui/_pyautogui_wayland.py", line 29, in <module>
    Point = collections.namedtuple("Point", "x y")
            ^^^^^^^^^^^
NameError: name 'collections' is not defined. Did you forget to import 'collections'

wang-qa avatar Apr 16 '25 08:04 wang-qa

默认初始化项目后报错 report_2025-04-16_05-14-01.sarif.json

pip_list.txt

还需手动安装.....(头大,x11没问题,wayland一大堆问题) pip

  • playwright
  • rpm
  • letmego
  • Quartz
  • AppKit
  • tomli

wang-qa avatar Apr 16 '25 09:04 wang-qa

根据 #138 修改 报错变了_tkinter.TclError: couldn't connect to display ":0"

报错内容
(my_project) ubutnu@ubutnu-VMware-Virtual-Platform:~/my_project$ python manage.py run
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录
cat: /home/ubutnu/.xsession-errors: 没有那个文件或目录

(manage.py:27384): dbind-WARNING **: 17:45:26.943: AT-SPI: Error in GetItems, sender=org.freedesktop.DBus, error=An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.53" (uid=1000 pid=27384 comm="python manage.py run" label="/home/ubutnu/.local/share/JetBrains/Toolbox/apps/pycharm-community/bin/pycharm (unconfined)") interface="org.a11y.atspi.Cache" member="GetItems" error name="(unset)" requested_reply="0" destination=":1.31" (uid=1000 pid=19342 comm="/snap/firefox/5751/usr/lib/firefox/firefox" label="snap.firefox.firefox (enforce)")


 ██╗   ██╗  ██████╗  ██╗   ██╗  ██████╗  ██╗   ██╗ 
 ╚██╗ ██╔╝ ██╔═══██╗ ██║   ██║ ██╔═══██╗ ██║   ██║ 
  ╚████╔╝  ██║   ██║ ██║   ██║ ██║   ██║ ██║   ██║ 
   ╚██╔╝   ██║   ██║ ██║   ██║ ██║▄▄ ██║ ██║   ██║ 
    ██║    ╚██████╔╝ ╚██████╔╝ ╚██████╔╝ ╚██████╔╝ 
    ╚═╝     ╚═════╝   ╚═════╝   ╚══▀▀═╝   ╚═════╝  


╱╭━━━╮╱╱╱╱╱╭╮╱╱╭╮╱╭╮╱╱╱╱╭━━━╮╱
╱┃╭━╮┃╱╱╱╱╭╯┃╱╱┃┃╱┃┃╱╱╱╱┃╭━╮┃╱
╱╰╯╭╯┃╱╱╱╱╰╮┃╱╱┃╰━╯┃╱╱╱╱┃┃┃┃┃╱
╱╭━╯╭╯╱╱╱╱╱┃┃╱╱╰━━╮┃╱╱╱╱┃┃┃┃┃╱
╱┃╰━━╮╱╭╮╱╭╯╰╮╱╱╱╱┃┃╱╭╮╱┃╰━╯┃╱
╱╰━━━╯╱╰╯╱╰━━╯╱╱╱╱╰╯╱╰╯╱╰━━━╯╱
Code: https://github.com/linuxdeepin/youqu
Docs: https://youqu.uniontech.com/
PyPI: https://pypi.org/project/youqu
============================================================
Authorization required, but no authorization protocol specified

Authorization required, but no authorization protocol specified

Traceback (most recent call last):
  File "/home/ubutnu/my_project/manage.py", line 106, in <module>
    Manage()
  File "/home/ubutnu/my_project/manage.py", line 68, in __init__
    LocalRunner(**_local_kwargs).local_run()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubutnu/my_project/src/rtk/local_runner.py", line 128, in __init__
    screen = Tk()
             ^^^^
  File "/usr/lib/python3.12/tkinter/__init__.py", line 2345, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: couldn't connect to display ":0"

编译wayland_autotool失败 后经发现 ubuntu包为 libqt5gui5t64、libqt5core5t64 、缺少qt5-default deepin包 libqt5gui5、 libqt5core5a、qt5-default 在deepin下编译见 #143

ubuntu编译 wayland_autotool 点击查看详情
(my_project) ubutnu@ubutnu-VMware-Virtual-Platform:~/my_project/src/depends/wayland_autotool$ apt policy libkf5waylandclient5
libkf5waylandclient5:
  已安装:4:5.115.0-0ubuntu5
  候选: 4:5.115.0-0ubuntu5
  版本列表:
 *** 4:5.115.0-0ubuntu5 500
        500 http://cn.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
        100 /var/lib/dpkg/status
(my_project) ubutnu@ubutnu-VMware-Virtual-Platform:~/my_project/src/depends/wayland_autotool$ sh install.sh wayland_env
bash: 行 1: 1: 未找到命令
命中:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease                                    
命中:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease                            
命中:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease                          
命中:4 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu noble InRelease
命中:5 http://security.ubuntu.com/ubuntu noble-security InRelease
正在读取软件包列表... 完成                  
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
有 1 个软件包可以升级。请执行 ‘apt list --upgradable’ 来查看它们。
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
注意,选中 'libqt5gui5t64' 而非 'libqt5gui5'
注意,选中 'libqt5core5t64' 而非 'libqt5core5a'
没有可用的软件包 qt5-default,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到

E: 软件包 qt5-default 没有可安装候选
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/ubutnu/my_project/src/depends/wayland_autotool/build
[ 66%] Built target wayland_autotool_autogen_timestamp_deps
[ 66%] Built target wayland_autotool_autogen
[ 66%] Building CXX object CMakeFiles/wayland_autotool.dir/autotool.cpp.o
[ 66%] Building CXX object CMakeFiles/wayland_autotool.dir/main.cpp.o
[ 66%] Building CXX object CMakeFiles/wayland_autotool.dir/wayland_autotool_autogen/mocs_compilation.cpp.o
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/autotool.h: not a directory
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/autotool.cpp: not a directory
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/main.cpp: not a directory
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/autotool.h: not a directory
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/autotool.cpp: not a directory
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/main.cpp: not a directory
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/autotool.h: not a directory
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/autotool.cpp: not a directory
cc1plus: warning: /home/ubutnu/my_project/src/depends/wayland_autotool/main.cpp: not a directory
In file included from /home/ubutnu/my_project/src/depends/wayland_autotool/build/wayland_autotool_autogen/EWIEGA46WW/moc_autotool.cpp:10,
                 from /home/ubutnu/my_project/src/depends/wayland_autotool/build/wayland_autotool_autogen/mocs_compilation.cpp:2:
/home/ubutnu/my_project/src/depends/wayland_autotool/build/wayland_autotool_autogen/EWIEGA46WW/../../../autotool.h:15:10: fatal error: KWayland/Client/ddeseat.h: 没有那个文件或目录
   15 | #include <KWayland/Client/ddeseat.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/wayland_autotool.dir/build.make:83:CMakeFiles/wayland_autotool.dir/wayland_autotool_autogen/mocs_compilation.cpp.o] 错误 1
make[2]: *** 正在等待未完成的任务....
In file included from /home/ubutnu/my_project/src/depends/wayland_autotool/main.cpp:6:
/home/ubutnu/my_project/src/depends/wayland_autotool/autotool.h:15:10: fatal error: KWayland/Client/ddeseat.h: 没有那个文件或目录
   15 | #include <KWayland/Client/ddeseat.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/wayland_autotool.dir/build.make:111:CMakeFiles/wayland_autotool.dir/main.cpp.o] 错误 1
In file included from /home/ubutnu/my_project/src/depends/wayland_autotool/autotool.cpp:6:
/home/ubutnu/my_project/src/depends/wayland_autotool/autotool.h:15:10: fatal error: KWayland/Client/ddeseat.h: 没有那个文件或目录
   15 | #include <KWayland/Client/ddeseat.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/wayland_autotool.dir/build.make:97:CMakeFiles/wayland_autotool.dir/autotool.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:113:CMakeFiles/wayland_autotool.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2

wang-qa avatar Apr 16 '25 09:04 wang-qa