Gtk-Message: 10:32:31.466: Failed to load module "canberra-gtk-module"
이전 댓글 표시
I installed matlab 2019a with update3 on ubuntu 16.04 64bit. When I run matlab, I got output: Gtk-Message: 10:32:31.466: Failed to load module "canberra-gtk-module".
How to sort this problem.
Thanks in advance.
댓글 수: 4
Rica Constantinescu
2019년 7월 20일
sudo apt-get install libcanberra-gtk*
Zachary LaFlair
2020년 11월 17일
For anyone still bashing their heads off the wall in 2020 on R2020b. I'm using Arch Linux on Gnome Xorg. Currently patched at Kernel 5.9.8. I installed from the MATLAB website and created a folder with user permissions in the default install folder. Then ran ./install.
Here's what i used.
I first had to install gtk-2 package from the official arch repos.
sudo pacman -S gtk-2 %it might have worked after this if i didn't mess with my java install so much trying to make it work
Next i had to rollback my java version...
java --version %I had absolutely blown away my java install at this point and grabbed many packages from AUR to no avail so i got the official repo package
sudo pacman -S jre8-openjdk % Installs java
sudo pacman -S jdk8-openjdk % Installs java
Finally set matlab to open with my known good/supported version
export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk/jre
matlab %%opens MATLAB window without issues or failures
% I can and did plot a polynomial just to make it work
% First plot polynomial code that shows up on google.
y_1 = @(x) -0.6729+4.8266*x-0.4855*x.^2+0.0312*x.^3
x_1 = 0:0.1:33.5;
plot(x_1,y_1(x_1))
Michael Levy
2025년 2월 27일
편집: Walter Roberson
2025년 2월 27일
This is not working for me. When I type MATLAB from linux Ubuntu command window, what appears is failed ot load module "canberra-gtk-module" I follow the instructions in
however, in my /lib/x86_64-linux-gnu folder I see gtk-2.0, gtk-3.0, and gtk-4.0 . Which of these am I supposed to use????
Moving on, the answer here is a bit dated and overly specific without explaining how to generalize.
For example, I write export MATLAB_JAVA=/usr/lib/jvm/java-1.21.0-openjdk-amd64
This is because when I try to find where my ---- (I do not know is it is abin file? a run file? execuatable file? nonone tells)
The reason I type that is because from https://stackoverflow.com/questions/5251323/where-can-i-find-the-java-sdk-in-linux-after-installing-it I see that update-java-alternatives -l will tell you which java implementation is the default for your system and where in the filesystem it is installed.
I need help. Please MATLAB help me
답변 (14개)
Angel Palacios-Marin
2022년 6월 11일
편집: Angel Palacios-Marin
2022년 6월 11일
So the answer is in a terminal excecute the following
sudo apt-get install libcanberra-gtk* libgconf-2-4
sudo ln -s /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-module.so /usr/lib/libcanberra-gtk-module.so
The second line will create a link to the module. Matlab works with gtk-2.0 module. For other linux distributions follow this.
Problem solved, at least for me.
댓글 수: 25
James Herman
2022년 7월 1일
Thank you! This worked for me on Ubuntu 22.04 with R2022a.
yassine keb
2022년 7월 5일
had the same issue ubuntu 18.04 matlab 2021b, and this solved it, thank you!
Bibek Dhakal
2022년 7월 17일
Worked for me. Thanks!
Alireza
2022년 7월 24일
Thanks!
abdullah mamun
2022년 8월 15일
Thanks a lot. Worked for me.
Rishabh
2022년 8월 23일
Works (Ubuntu, MATLAB R2022a)
Rizal ICHWANSYAH
2022년 9월 7일
WORKS!! Ubuntu 18.04, MATLAB R2022a
Rizal ICHWANSYAH
2022년 10월 1일
and STILL works for matlab R2022b
Rahul
2022년 10월 16일
it worked, thanks
Shashank Verma
2022년 10월 31일
It worked for me. Thanks
Youwei CAO
2023년 2월 2일
Cool it successfully worked!!!! I have searched for 1h for the solution and it is the ONLY ONE who works.
Thank you !
Jose Vidal-Nunez
2023년 3월 12일
It also worked in Ubuntu 22.04 with Mathlab 2022b. Thanks so much.
Apratim Majumder
2023년 3월 17일
편집: Apratim Majumder
2023년 3월 19일
It also works in Ubuntu 22.04 with Matlab 2023a.
:-D Thanks!
Giuseppe
2023년 5월 4일
it works in Ubuntu 22.04 with Matlab 2023a. great
Larry Godwin
2023년 5월 11일
Thank you so much. It works for Matlab 2023a.
Rizhong Lin
2023년 5월 23일
Thank you very much! It works on Ubuntu 22.04.2 LTS with Matlab 2022b.
Ali
2023년 7월 13일
thank you
嘉祯
2024년 4월 4일
Thank you very much! It also works on Ubuntu20.04 with Matlab 2024a
Terje Sparengen
2024년 4월 17일
Thanks!
It works on Ubuntu22.04 with matlab R2020a
Caio Lima
2024년 5월 8일
Thank you!
It works on Ubuntu 22.04 too with Matlab R2021a
Dean
2024년 7월 3일
Works for me ... MATLAB 2023b, Ubuntu / Pop_OS 22.04
Rezim
2024년 8월 16일
worked. MATLAB 2024a, Ubuntu 22.04
Thanks man..!!
Nithin
2024년 9월 15일
Worked for MATLAB R2024b.
Thank you.
Hao
2024년 9월 23일
Worked for MATLAB R2024b, Ubuntu 24.04.
Thank you.
chaoliang
2024년 10월 8일
Worked for matlab 2022b. But we use the command of 'sudo apt-get -y install libcanberra-gtk-module' to install libcanberra-gtk. The second step is important. Don't forget to create link under /usr/lib directory using the command uppon. If the Linux version and related gtk version is different, you should check it under the /usr/lib/*-linux-gnu/gtk-*.
Scott Minkin
2019년 12월 15일
편집: Scott Minkin
2019년 12월 15일
I believe the canberra-gtk-module messages have no detrimental effect on MATLAB and can be ignored, but having said that...
To run MATLAB R2019a or R2019b on Ubuntu 16.04 LTS without the canberra-gtk-message:
You have three environmental variables that need to be set before running matlab
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
export LIBOVERLAY_SCROLLBAR=0
export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules
OR you can run matlab in the bash shell by typing:
$ GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 LIBOVERLAY_SCROLLBAR=0 GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules /usr/local/MATLAB/R2019a/bin/matlab
----
To run R2019a on Ubuntu 18.04 LTS without the canberra-gtk-message:
You need to install libcanberra-gtk-module and libgconf-2-4
You don't need to set any environmental variables.
----
To run R2019b on Ubuntu 18.04 LTS without the canberra-gtk-message:
you need to install libcanberra-gtk-module
You have one environmental variable that needs to be set before running matlab:
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
OR you can run matlab in the bash shell by typing:
$ GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 /usr/local/MATLAB/R2019b/bin/matlab
Good luck.
댓글 수: 6
I am running Matlab R2019b on Ubuntu 19.10 and this solved my issue. Thank you!
I ran the following command in my terminal:
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
Now when I run Matlab the canberra message is no longer displayed.
However I still have the following message appearing in my Terminal:
[0210/125521.960859:INFO:context.cpp(159)] Using multi-threaded message loop for Linux
Any ideas how to get rid of this?
Brian Zelenke
2020년 5월 23일
To run MATLAB R2020a on RedHat (RHEL) 8.2 without either the canberra-gtk-module or pk-gtk-module "failed to load module" warnings, setting just one environmental variable before running MATLAB fixed both warnings:
export GTK_PATH=/usr/lib64/gtk-2.0/
Walter Roberson
2020년 9월 12일
SREEJITH V S comments to LeChat:
This worked for me
Paul Galloux
2021년 5월 21일
편집: Paul Galloux
2021년 5월 21일
We have this messages with matlab 2020a ubuntu 18.04 :
Gtk-Message: 12:35:22.680: Failed to load module "overlay-scrollbar"
Gtk-Message: 12:35:22.685: Failed to load module "canberra-gtk-module"
and the command lines :
GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 LIBOVERLAY_SCROLLBAR=0 /usr/local/bin/matlab
or :
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0/modules:$LD_LIBRARY_PATH LIBOVERLAY_SCROLLBAR=0 /usr/local/bin/matlab
solve this for us.
precisions : overlay-scrollbar and libcanberra-gtk-module had been already installed before the messages (sudo apt install overlay-scrollbar overlay-scrollbar-gtk2 libcanberra-gtk-module)
many thanks for the tip
ubaidulla
2022년 3월 10일
This worked for me on ubuntu 20.04; Thank you
Julija Bucar
2023년 2월 26일
solution on arch was to export and set GTK_PATH to matlab executable
Xiao Wang
2019년 7월 18일
7 개 추천
댓글 수: 12
Pedro Tareco
2019년 11월 12일
This solved it for me. Thanks!
Seth Wagenman
2020년 4월 8일
I did the install followed by:
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
Now the message is gone completely.
Adam
2020년 8월 18일
Same. Good solution.
seager1989
2020년 8월 21일
I also did the:
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
. Fixed, Thank you
francisco borja sanz martinez
2021년 3월 2일
It fix the report in Ubuntu 20.04 LTS but when you use this then after you close matlab you have also stop the program in the terminal with <CTRL + C>
Greg Fichter
2021년 6월 4일
Thanks, this works with R2021a in Ubuntu 20.04.
Kamal Lamichhane
2021년 6월 22일
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 worked me too with MatlabR2020b and Ubuntu20.04. Thanks @seager1989!
Ada Görgün
2021년 6월 22일
편집: Ada Görgün
2021년 6월 22일
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 worked for me too with MatlabR2020b and Ubuntu 18.04. Thanks everyone!
Mark Thomas
2021년 8월 13일
편집: Walter Roberson
2021년 8월 14일
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-3.0
(and .../gtk-2.0) worked for me with MATLAB R2020b Update 6 and Ubuntu 21.04. Many thanks.
and...
export GTK_PATH=/usr/lib64/gtk-2.0
worked with MATLAB R2020a Update 6 on CentOS 6.
Maximilian Nentwich
2021년 9월 9일
편집: Maximilian Nentwich
2021년 9월 9일
export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
for MATLAB R2021a Update 4 and Ubuntu 20.04
Thank you!
Tim Divett
2021년 11월 18일
worked for me, thanks
Jan Studnicka
2019년 10월 16일
4 개 추천
See bug reports:
"On some Linux distributions, a message appears in the terminal window when starting MATLAB:
Gtk-Message: <timestamp>: Failed to load module "canberra-gtk-module"
and/or
Gtk-Message: <timestamp>: Failed to load module "pk-gtk-module"
This message is informational and has no effect on MATLAB."
댓글 수: 3
Rachel Clark
2020년 10월 13일
It doesn't have an effect on MATLAB but it disables your terminal as the process keeps running whilst MATLAB is open
Robert Eng
2020년 11월 26일
I tried the work around suggested in the "bug report" from the above link. Did not fix the problem. I can use the matlab as is with the error but irritating to keep the terminal open and running otherwise Matlab closes
Nour
2022년 8월 11일
worked for me, thanks !
Frederico Azevedo
2019년 12월 14일
3 개 추천
I had the same error with my R2019b installation in ubuntu 19.10. After I installed the module with "sudo apt install libcanberra-gtk-module -y", if I call matlab from the command line with the cmd "LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0/modules:$LD_LIBRARY_PATH /usr/local/bin/matlab", the error message doesn't appear anymore.
댓글 수: 2
Kefan Yu
2021년 6월 9일
It works on R2021a Ubuntu20.04.
Estefania Murcia Lozano
2021년 9월 15일
Very thankfull.
Kehelwala Dewage Gayan Maduranga
2020년 11월 18일
편집: Kehelwala Dewage Gayan Maduranga
2020년 11월 18일
2 개 추천
I am installing matlab R2020b on Ubuntu 18.04 and having this error
Gtk-Message: 17:15:55.104: Failed to load module "canberra-gtk-module"
댓글 수: 8
Mehdi Zouari
2020년 12월 5일
same
Anyun Sharma
2021년 1월 12일
Same
Anyun Sharma
2021년 1월 12일
Pls help
Mohamed Ibrahim
2021년 2월 8일
same on ubuntu 20.04
ARJUN YADAV
2021년 4월 22일
same (ubuntu 20.04 LTS)
Rob Kudyba
2021년 5월 17일
편집: Rob Kudyba
2021년 5월 17일
same on Fedora 33 and Matlab 2021A
Imad Abied
2021년 5월 27일
same on Ubuntu 20.04 and Matlab R2021A
Paul Galloux
2022년 2월 1일
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0/modules:$LD_LIBRARY_PATH
before to launch matlab or put this line in your .bashrc
solve-it for me ub20.04
Chen Wang
2019년 10월 12일
0 개 추천
Finally I solve this problem by change from 2019b to 2019a. The error message disappear. There must be something wrong with 2019b's Linux version.
Alex Pedcenko
2019년 11월 28일
0 개 추천
this is not the "problem"
It had the same message and then I followed @Scott Minkin recommandation and I still have a message, but a different one:
me@myPC:~$ matlab &
[1] 22115
me@myPC:~$ Gtk-Message: 17:29:07.572: Failed to load module "canberra-gtk-module"
[0116/172911.622390:INFO:context.cpp(159)] Using multi-threaded message loop for Linux
me@myPC:~$ export GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0
[1]+ Done matlab
me@myPC:~$ matlab &
[1] 29896
me@myPC:~$ [0116/173302.576327:INFO:context.cpp(159)] Using multi-threaded message loop for Linux
I then tried this:
me@myPC:~$ sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
Reading package lists... Done
Building dependency tree
Reading state information... Done
libcanberra-gtk3-module is already the newest version (0.30-7ubuntu1).
libcanberra-gtk-module is already the newest version (0.30-7ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
me@myPC:~$ matlab &
[2] 7532
me@myPC:~$ [0116/173838.654136:INFO:context.cpp(159)] Using multi-threaded message loop for Linux
In both case Matlab 2019b is launched as expected but I am wondering if everything is ok because of the messages I keep having in the Terminal.
I am running Ubuntu 19.10. Thank you for your expertise.
댓글 수: 3
Manuel Mercier
2020년 4월 4일
I am running Matlab R2020a on 19.10 and also experiencing:
Gtk-Message: 11:36:25.279: Failed to load module "appmenu-gtk-module"
Gtk-Message: 11:36:25.286: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:36:25.287: Failed to load module "pk-gtk-module"
When I do the call
$ GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 matlab
only the last error message shows up.
Of course I did update the package to the last version and so on...
So far I did not see any related bug while running matlab scripts. Still it would be reinsurring to see the Matlab crew taking care of this issue.
Scott Minkin
2020년 4월 8일
Not sure why the pk-gtk-module warning is coming up. What is the value of $GTK_MODULES? And can you try blanking it out by setting GTK_MODULES=
GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 GTK_MODULES= matlab
Good luck.
--Scott
Manuel Mercier
2020년 4월 16일
GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 GTK_MODULES = matlab
launch Matlab, and display
Failed to load module "pk-gtk-module"
in the console
Burcin Arici
2020년 4월 9일
0 개 추천
I also get the same error message while running
Gtk-Message: 04:38:48.679: Failed to load module "canberra-gtk-module"
for Matlab R2020a on Ubuntu 19.10, it works slower than R2019b but untill now, during running the program, it does not give an another error.
Chase Philport
2022년 12월 7일
0 개 추천
Also having this error with my install

Leonardo
2025년 3월 5일
Had the same problem on EndeavourOS (Arch-based). By looking through yay I saw that libcanberra was actually installed, but running again
yay -S libcanberra
solved the problem apparently. I have been using MATLAB R2024b Revision 5.
Andreas Viborg
2025년 4월 15일
편집: Andreas Viborg
2025년 5월 3일
I learned that the two files libgtk-x11-2.0.so.0 supplied in /usr/local/MATLAB/R2019b/bin/glnxa64 are causing this issue. Simply removing them helped me:
cd /usr/local/MATLAB/R2019b/bin/glnxa64
sudo mkdir exclude
sudo mv libg*-x11-2.0.so.0 exclude/
댓글 수: 1
Andreas Viborg
2025년 5월 3일
After the above I still got:
Failed to load module "pk-gtk-module"
I found the required libpk-gtk-module file my gtk-3.0 module folder. Copying it to the Matlab folder clears this error message:
sudo cp /usr/lib64/gtk-3.0/modules/libpk-gtk-module.so /usr/local/MATLAB/R2019b/bin/glnxa64/
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!