gnome-terminal and some other commands cannot start in Ubuntu 18.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite
1












In Ubuntu 18.04 after some time of usage, I got the following error when trying to start gnome-terminal:



Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/home/victor/.local/lib/python3.6/site-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: /home/victor/.local/lib/python3.6/site-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so: undefined symbol: g_interface_info_find_method


Similar error occurs also when I try to launch gnome-tweaks or execute the command add-apt-repository.
However, when I try to run gnome-terminal from "open in terminal" menu of nautilus, it started normally.
The same error occurs also if I try to do in python3:



from gi.repository import GLib


I will be grateful for any advice.



Here is an additional output related to python3 parameters:



$ type python3; readlink /usr/bin/python3
python3 is /usr/bin/python3
python3.6
$ echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'

['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/victor/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']


Finally, I have found the cause of error. The library _gi.cpython-36m-x86_64-linux-gnu.so of python3.6 module gi depends on libgirepository-1.0.so from libgirepository1.0-dev package, but that dependence is not listed in the ELF header of the library. So, the workaround I have used is to add



export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgirepository-1.0.so


to ~/.profile. However, I still don't understand, how may that happen and how to solve the problem in the right way. I am a novice in C programming and have found the solution after reading the excellent paper on library linking at http://www.kaizou.org/2015/01/linux-libraries/







share|improve this question






















  • Please post the output of type python3; readlink /usr/bin/python3.
    – wjandrea
    May 26 at 17:43










  • And post the output of echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'
    – wjandrea
    May 26 at 17:46










  • @wjandrea: Please, see the output in the edited post
    – victor
    May 26 at 19:43














up vote
1
down vote

favorite
1












In Ubuntu 18.04 after some time of usage, I got the following error when trying to start gnome-terminal:



Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/home/victor/.local/lib/python3.6/site-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: /home/victor/.local/lib/python3.6/site-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so: undefined symbol: g_interface_info_find_method


Similar error occurs also when I try to launch gnome-tweaks or execute the command add-apt-repository.
However, when I try to run gnome-terminal from "open in terminal" menu of nautilus, it started normally.
The same error occurs also if I try to do in python3:



from gi.repository import GLib


I will be grateful for any advice.



Here is an additional output related to python3 parameters:



$ type python3; readlink /usr/bin/python3
python3 is /usr/bin/python3
python3.6
$ echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'

['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/victor/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']


Finally, I have found the cause of error. The library _gi.cpython-36m-x86_64-linux-gnu.so of python3.6 module gi depends on libgirepository-1.0.so from libgirepository1.0-dev package, but that dependence is not listed in the ELF header of the library. So, the workaround I have used is to add



export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgirepository-1.0.so


to ~/.profile. However, I still don't understand, how may that happen and how to solve the problem in the right way. I am a novice in C programming and have found the solution after reading the excellent paper on library linking at http://www.kaizou.org/2015/01/linux-libraries/







share|improve this question






















  • Please post the output of type python3; readlink /usr/bin/python3.
    – wjandrea
    May 26 at 17:43










  • And post the output of echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'
    – wjandrea
    May 26 at 17:46










  • @wjandrea: Please, see the output in the edited post
    – victor
    May 26 at 19:43












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





In Ubuntu 18.04 after some time of usage, I got the following error when trying to start gnome-terminal:



Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/home/victor/.local/lib/python3.6/site-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: /home/victor/.local/lib/python3.6/site-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so: undefined symbol: g_interface_info_find_method


Similar error occurs also when I try to launch gnome-tweaks or execute the command add-apt-repository.
However, when I try to run gnome-terminal from "open in terminal" menu of nautilus, it started normally.
The same error occurs also if I try to do in python3:



from gi.repository import GLib


I will be grateful for any advice.



Here is an additional output related to python3 parameters:



$ type python3; readlink /usr/bin/python3
python3 is /usr/bin/python3
python3.6
$ echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'

['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/victor/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']


Finally, I have found the cause of error. The library _gi.cpython-36m-x86_64-linux-gnu.so of python3.6 module gi depends on libgirepository-1.0.so from libgirepository1.0-dev package, but that dependence is not listed in the ELF header of the library. So, the workaround I have used is to add



export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgirepository-1.0.so


to ~/.profile. However, I still don't understand, how may that happen and how to solve the problem in the right way. I am a novice in C programming and have found the solution after reading the excellent paper on library linking at http://www.kaizou.org/2015/01/linux-libraries/







share|improve this question














In Ubuntu 18.04 after some time of usage, I got the following error when trying to start gnome-terminal:



Traceback (most recent call last):
File "/usr/bin/gnome-terminal", line 9, in <module>
from gi.repository import GLib, Gio
File "/home/victor/.local/lib/python3.6/site-packages/gi/__init__.py", line 42, in <module>
from . import _gi
ImportError: /home/victor/.local/lib/python3.6/site-packages/gi/_gi.cpython-36m-x86_64-linux-gnu.so: undefined symbol: g_interface_info_find_method


Similar error occurs also when I try to launch gnome-tweaks or execute the command add-apt-repository.
However, when I try to run gnome-terminal from "open in terminal" menu of nautilus, it started normally.
The same error occurs also if I try to do in python3:



from gi.repository import GLib


I will be grateful for any advice.



Here is an additional output related to python3 parameters:



$ type python3; readlink /usr/bin/python3
python3 is /usr/bin/python3
python3.6
$ echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'

['', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/home/victor/.local/lib/python3.6/site-packages', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']


Finally, I have found the cause of error. The library _gi.cpython-36m-x86_64-linux-gnu.so of python3.6 module gi depends on libgirepository-1.0.so from libgirepository1.0-dev package, but that dependence is not listed in the ELF header of the library. So, the workaround I have used is to add



export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgirepository-1.0.so


to ~/.profile. However, I still don't understand, how may that happen and how to solve the problem in the right way. I am a novice in C programming and have found the solution after reading the excellent paper on library linking at http://www.kaizou.org/2015/01/linux-libraries/









share|improve this question













share|improve this question




share|improve this question








edited May 31 at 10:29

























asked May 26 at 16:23









victor

634




634











  • Please post the output of type python3; readlink /usr/bin/python3.
    – wjandrea
    May 26 at 17:43










  • And post the output of echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'
    – wjandrea
    May 26 at 17:46










  • @wjandrea: Please, see the output in the edited post
    – victor
    May 26 at 19:43
















  • Please post the output of type python3; readlink /usr/bin/python3.
    – wjandrea
    May 26 at 17:43










  • And post the output of echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'
    – wjandrea
    May 26 at 17:46










  • @wjandrea: Please, see the output in the edited post
    – victor
    May 26 at 19:43















Please post the output of type python3; readlink /usr/bin/python3.
– wjandrea
May 26 at 17:43




Please post the output of type python3; readlink /usr/bin/python3.
– wjandrea
May 26 at 17:43












And post the output of echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'
– wjandrea
May 26 at 17:46




And post the output of echo "$PYTHONPATH"; python3 -c 'import sys; print(sys.path)'
– wjandrea
May 26 at 17:46












@wjandrea: Please, see the output in the edited post
– victor
May 26 at 19:43




@wjandrea: Please, see the output in the edited post
– victor
May 26 at 19:43















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040640%2fgnome-terminal-and-some-other-commands-cannot-start-in-ubuntu-18-04%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1040640%2fgnome-terminal-and-some-other-commands-cannot-start-in-ubuntu-18-04%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491