Qt Creator - "Cannot create file: Unknown error" - c++

I bought a new Mac(macOS Big Sur, Apple M1). And I moved all my files from the old Mac to the new one. After downloading Qt creator (I do c++ projects using Qt), whenever I open or close the Qt Creator it shows:
Cannot create file /Users/[username]/.config/QtProject/qtcreator/devices.xml: Unknown error
Multiple times. And I do not know how to fix it.

The problem is that you do not have permissions for the /Users/[username]/.config folder. Use in terminal:
sudo chown -R <username> .config
The answer is from here: "Cannot create file", "Cannot save session" - unknown error, macOS

You can solve the problem by running the following command in terminal:
sudo chown [username] /Users/[username]/.config/
Replace [username] with your username.

Related

clang-format not working in vim - missing libtinfo.so.5 library

I'm trying to set up vim for C++ editing in Ubuntu 20. I'd like to use clang-format to format my files. My vimrc looks as follows:
map <C-K> :py3f /usr/local/clang-10.0.0/share/clang/clang-format.py<cr>
imap <C-K> <c-o>:py3f /usr/local/clang-10.0.0/share/clang/clang-format.py<cr>
When I run this in vim by hitting C-k over a block of code, I get this error:
b'clang-format: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory\n'
No output from clang-format (crashed?).
Please report to bugs.llvm.org.
Has anyone encountered this before? How do I resolve this?
Sorted it out. It looks like Ubuntu 20 has libtinfo.so.6. I installed the libtinfo.so.5 package using:
sudo apt update && sudo apt install -y libtinfo5
Note - I saw some posts on doing an alias "ln -s" on the libtinfo.so.6 file. This did not work for me.

Have someone install "IITB Simplecpp in mac"?

I am trying to install simplecpp from this website "https://www.cse.iitb.ac.in/~ranade/simplecpp/"
I am following the mac version.
but when I try to cp file "/usr/include/xlocale.h ./" it gives an error "cp: /usr/include/xlocale.h: No such file or directory"
Please, someone, install and tells me if I am doing wrong or there is an error with the commands given in the website.
Run locate xlocale.h to find where that file exists on your machine, and copy it from one of those locations. For example on some Macs it is in /Library/Developer/CommandLineTools/SDKs/usr/include/xlocale.h if you have XCode and its "Command Line Tools" installed.

How to install tortoise hg Mercurial on Windows, virtual environment

I am trying to install Django's debug_toolbar line profiler. As per the docs, I need to install Mercurial.
I have installed Mercurial on my Windows machine and it looks OK when I type hg in the command prompt outside of my project's virtual environment. The problem is that the same command throws an error when I enter it inside the virtual environment:
ERROR: Error [WinError 2] The system cannot find the file specified while executing command hg clone --noupdate -q https://bitbucket.org/kmike/line_profiler 'c:\[user]\environments\[project]\src\line-profiler'
ERROR: Cannot find command 'hg' - do you have 'hg' installed and in your PATH?
How do I fix that? The end goal is to install line_profiler
ERROR: Cannot find command 'hg' - do you have 'hg' installed and in your PATH?
The key is this error message. Do you have the path to the hg.exe included in your Windows path? What does your "virtual environment" mean exactly?
In my eyes the easies way to get working mercurial on Windows is to use scoop.
Then you don't have to worry about adding the path, just install mercurial via
scoop install mercurial
and you are done.

How to edit /usr/include/dlfcn.h in mac

I have to edit this file /usr/include/dlfcn.h ( a compilation for a package, and it's maintainer told me to add some lines in this file). But I can't edit it. It's read only. I use sudo chmod 777 to change it's permission, but I don't have the permission to change it. I tried , for example, sudo -s, or su, But I don't have permission.
Using "sudo", "sudo -s" , "su" are all the ways I know to get permission to change a file. But I failed in this case. So who knows the solution, can you help me?
I use osx 10.11 and xcode 7.3.1
How did you continue after sudoing? You tried directly to open it with your editor and it didn't allow? (i.e. sudo gedit/vi/whatever dlfnc.h)

Installing the Qt SDK shows the message: cannot execute binary file

My environment is Linux 11.04
When I want to install Qt SDK
I download the SDK:qt-creator-linux-x86_64-opensource-2.5.2.bin
I move this file to /opt
and then
chmod u+x qt-creator-linux-x86_64-opensource-2.5.2.bin
./qt-creator-linux-x86_64-opensource-2.5.2.bin
but it shows that: cannot execute binary file
I think whether if it is because my Ubuntu is belong to 32-bit architecture
so I download qt-creator-linux-x86-opensource-2.5.2.bin
also move it to /opt file
and give the command:
chmod u+x qt-creator-linux-x86-opensource-2.5.2.bin
./qt-creator-linux-x86-opensource-2.5.2.bin
The same message still shows.
I give another command:
sudo ./qt-creator-linux-x86-opensource-2.5.2.bin
but it shows that Syntax error: ")" unexpected
how can I resolve this problem?