You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Debian Stretch下Qt Creator无法运行,创建device.xml报错求助

Troubleshooting Qt Creator Freeze & Permission Error on Debian Stretch

Hey Gary, let's work through this frustrating Qt Creator issue you're hitting on Debian Stretch. I've dealt with similar permission-related glitches before, so here are some targeted fixes to try:

  • Clean up stale config files first
    Sometimes manually creating the config directories can leave behind hidden permission mismatches. Let's start fresh:

    1. Make sure Qt Creator is fully closed (kill any background processes with killall qtcreator)
    2. Delete the entire existing QtProject config folder: rm -rf ~/.config/QtProject
    3. Don't recreate the directory manually—let Qt Creator generate it on its own when you launch it next. This ensures the folder has the correct user ownership and permissions from the start.
  • Verify directory ownership (not just permission bits)
    Setting xrw permissions isn't enough if the directory is owned by another user (like root, if you ran the installer with sudo):

    1. Check the owner of your .config directory with: ls -ld ~/.config
    2. If the output doesn't show gary gary as the owner/group, fix it recursively with: sudo chown -R gary:gary ~/.config
      This ensures Qt Creator (running as your user) has full access to write its config files.
  • Install via Debian's official repositories (instead of the online installer)
    Your Synaptic issue might have been due to an outdated package list or missing core packages. Try this:

    1. Update your package index first: sudo apt update
    2. Install the core Qt Creator and Qt5 runtime packages: sudo apt install qtcreator qt5-default
    3. Launch Qt Creator with qtcreator and see if the freeze/error persists. This avoids potential permission conflicts from the online installer.
  • Check for AppArmor restrictions
    Debian Stretch uses AppArmor by default, which can block apps from writing to certain directories even if file permissions look correct:

    1. Check if AppArmor is active: sudo aa-status
    2. Temporarily stop it to test: sudo systemctl stop apparmor
    3. Launch Qt Creator—if it works, you'll need to adjust AppArmor's rules for Qt Creator or add an exemption to allow it to write to ~/.config/QtProject.
  • Reinstall the online installer as a regular user
    If you ran the online installer with sudo before, it might have set ownership of Qt's installation files to root. Try this:

    1. Uninstall your current Qt installation using the online installer (launch it again and select "Uninstall")
    2. Close the installer, then re-run it without sudo: ./qt-unified-linux-x64-3.0.4-online.run
    3. Install Qt Creator again as your regular user—this ensures all files and configs are owned by gary.

Start with the config cleanup and ownership check—those are the most likely fixes for the "Cannot create file /home/gary/.config/QtProject/qtcreator/device.xml Unknown error" message. Let me know how it goes!

内容的提问来源于stack exchange,提问作者Gary E

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 06:13:31