Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I ran qtcreator as sudo and now project isn't working
Forum Updated to NodeBB v4.3 + New Features

I ran qtcreator as sudo and now project isn't working

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mellow
    wrote on last edited by
    #1

    As the title sais, I ran qtcreator once as sudo and everything went fine, until I tried to open qtcreator again. Now all of a sudden I get errors like "Cannot overwrite file [my home dir]/.config/QtProject/qtversion/qtversion.xml: Permission denied". Turns out for some reason qtcreator changed the permissions for all the files in my .config/QtProject/qtversion/ as well as all my source files. Why?

    I changed permissions for these files and now I can open QtCreator once again, but when I try to build my project I get hundreds of strange errors like "undefined reference to QString::fromAscii(char const*, int)" for all Qt functions. What happened and how can I fix this?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Because you called it with sudo, so you ran it with root privileges and thus everything Qt Creator did was with the corresponding rights (writing files etc.). Right now you should delete the build directory and your project.pro.user and open again Qt Creator.

      Important note: never ever do development as root, you can kill your OS without even noticing before it's way too late.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved