Cannot connect creator comm socket /tmp/qt_temp.JH2103/stub-socket: No such file or directory

StackOverflow https://stackoverflow.com/questions/14010521

  •  12-12-2021
  •  | 
  •  

Frage

I'm getting this error when I run a console-based project from Qt Creator in Kubuntu. The Konsole terminal pops up but it only says:

Cannot connect creator comm socket /tmp/qt_temp.JH2103/stub-socket: No such file or directory
Press <RETURN> to close this window...
War es hilfreich?

Lösung

I had the same problem in Ubuntu 11.10 after installing Qt Creator with apt-get. If you will go to Qt Creator settings and change the terminal to /usr/bin/xterm -e then it should work.

Andere Tipps

This one works for me.

Menu | Tools | Options | Environment | General | System | Terminal
konsole --nofork -e

You can follow these steps to make the change:

Tools > Options > Environment > General > System > Terminal: xterm -e

The Qt Creator does not support a full terminal in its GUI/ Console applications started from the creator display their output in a window of the creator. This window does not support cin. To handle such programs they must be executed in an actual terminal. Also under linux the correct terminal program must be specified in the creator settings.

Set program execution to be in terminal in Qt Creator:

1 - In the left icon bar: press “Projects“

2 - In the area “Run Settings“: press “Show details“

3 - Check “Run in terminal“

Set terminal in Qt Creator for linux:

1 - Menu: Tools -> Options...

2 - Select “Environment“ -> “General“

3 - Set text for “Terminal:“ to “/usr/bin/xterm -e“

4 - Press “OK“

And you are done.

I ran into this same issue and it turned out I had too many instances of my console application running in the background. I left my settings to gnome-terminal -x and instead just closed all the running instances of my application then tried again and it worked.

If you still want to use konsole, this may be due to one of its settings. In Konsole, click Configure->Configure konsole-> Untick Run all Konsole windows in a single process.

Changing the terminal settings under Tools->Options->Environment->System->Terminal to /usr/bin/xterm -e worked for me on Ubuntu 13.10

This "Cannot connect creator comm socket /tmp/…/stub-socket: No such file or directory" error appeared for me when you I tried to run my project in debug mode. It was a basic project to get started using Qt with opencv (Load image file). I took me a while make it run.

the .pro file cotains:

QT       += core

QT       -= gui

TARGET = Hello
CONFIG   += console
CONFIG   -= app_bundle

TEMPLATE = app


SOURCES += main.cpp

INCLUDEPATH += "/usr/local/include/opencv"

LIBS += `pkg-config opencv --libs`

the main.cpp file contains:

#include <QCoreApplication>
#include <QDebug>
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace std;
using namespace cv;


int main()
{
   // QCoreApplication a(argc, argv);
    //qDebug()<<"hello world";
    Mat image;
  //image = imread(argv[1]);   // Read the file
  image = imread("/home/maalej/AhmedWork/maalej.jpg");

 if(! image.data )                              // Check for invalid input
  {
      cout <<  "Could not open or find the image" << std::endl ;

      return -1;
  }

  qDebug()<<"hello world";
  cout<<"**********"<<endl;
  namedWindow( "Display window" );// Create a window for display.
  imshow( "Display window", image );                   // Show our image inside it.

  waitKey(0);
  return 1;
    //return a.exec();
}

When running the qtcreator installed manullay after downloading it from the official website, any printed string appears in the console but not the image!!! Even with changing from /usr/bin/xterm -e to x-terminal-emulator -e . I uninstalled the qtcreator by running the qtcreatormanitenancetool and pressing uninstall all. I reinstalled qtcrator using ubuntu software center (recommended to install packages properly). I runned my project still nothing, but when changing the default setting x-terminal-emulator -e to /usr/bin/xterm -e, it worked and the image is loaded.

thank you Alexander.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top