Qt GUI app not running in container. Error : /lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8' not found (required by ./<GUI_App>)

Hello,

I am trying to run a QT GUI app inside the docker container. As a frirst step I read few blogs and went with GitHub - arBmind/qtcreator-containers: Docker containers with QtCreator - Ready to develop, build and run Qt Gui applications. to try to run my GUI app.

As am new to this I thought and used same dockerfile and I copied my GUI App and tried running it.

I got the below error:

/lib/x86_64-linux-gnu/libQt6Qml.so.6: no version information available (required by ./<GUI_App>)
/lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8’ not found (required by ./<GUI_App>)

Letr I used below lines inside the dockerfile then the first error fixed.

RUN export LD_LIBRARY_PATH=/opt/qtcreator/lib/Qt/lib/:$LD_LIBRARY_PATH
RUN echo ‘export LD_LIBRARY_PATH=/opt/qtcreator/lib/Qt/lib/:$LD_LIBRARY_PATH’ >> ~/.bashrc

But now when I try to run the app again the second/below error I got:

/lib/x86_64-linux-gnu/libQt6Core.so.6: version `Qt_6.8’ not found (required by ./<GUI_App>)

I understood it is version missmatch issue. But since 2 days I have tried many things that i can still issue persists. I failed to fix. Can anyone help m eon this please?

When I see the lib present inside the container it shows below libs :

And I am using below command to run the container :

sudo docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -it <GUI_APP>

The application needs 6.8. But when i try to install 6.8 version it is not allowing to do so. Am I missing anything here? please help.

regards,
Siddhartha V

How about sharing your Dockerfile and Docker run command or compose file?

The Docker Hub image seems to be up to date with 6.8.1.

Update: sorry, you got a run command, it seems very short compared to the example from the repo:

docker run -it \
    --mount src=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind \
    --mount src=/mnt/wslg,target=/mnt/wslg,type=bind \
    -e XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir \
    --mount src="$(pwd)",target=/build,type=bind \
    arbmind/qtcreator-gcc-qt:latest \
    qtcreator myproject.qbs

As I said before I used same docker file that is present in that git repo but made some changes :
here is the docker file :
Dockerfile.txt (11.4 KB)

I use below run command :

sudo docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -it <GUI_APP>

I used the same command shown in website but still smae issue.