Can't open Firefox

If none of the more specific forums is the right place to ask

Can't open Firefox

Postby pawRoot » 2018-02-01 13:57

Hi

I have made a script which installs newest version of Firefox, it installs fine,
but now on clean install of Debian and i3-gaps, it doesn't work.

Code: Select all
➜  ~ firefox
XPCOMGlueLoad error for file /opt/firefox/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Couldn't load XPCOM.


Here is the script:

Code: Select all
#!/usr/bin/env sh

wget -O firefox.tar.bz2 https://download.mozilla.org/\?product\=firefox-latest\&os\=linux64\&lang\=en-US

tar xvf firefox.tar.bz2

sudo rsync -a firefox /opt/
sudo rsync -a firefox.desktop /usr/share/applications/
sudo ln -s /opt/firefox/firefox /usr/local/bin/
sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 200
sudo update-alternatives --set x-www-browser /opt/firefox/firefox

rm firefox.tar.bz2
rm -rf firefox
User avatar
pawRoot
 
Posts: 507
Joined: 2016-12-28 18:26
Location: Poland

Re: Can't open Firefox

Postby steve_v » 2018-02-02 04:15

pawRoot wrote:
Code: Select all
libgtk-3.so.0: cannot open shared object file: No such file or directory

And you have checked that that library is installed, yes? Your script appears to contain no dependency checks...
steve_v
 
Posts: 695
Joined: 2012-10-06 05:31
Location: New Zealand

Re: Can't open Firefox

Postby pawRoot » 2018-02-02 04:19

steve_v wrote:
pawRoot wrote:
Code: Select all
libgtk-3.so.0: cannot open shared object file: No such file or directory

And you have checked that that library is installed, yes? Your script appears to contain no dependency checks...


And how could i check dependency ? no idea actually.
Anyway after installing other programs it suddenly started working, but i have no idea how to figure it out. :roll:
User avatar
pawRoot
 
Posts: 507
Joined: 2016-12-28 18:26
Location: Poland

Re: Can't open Firefox

Postby steve_v » 2018-02-02 04:43

Use 'ldd' on your binary to find the libraries it's linked against, then use look for packages that provide them via dpkg, apt-file etc.

One of those other programs probably had libgtk-3-0 listed as a dependency. That's the advantage of using distro provided packages, you don't have to hunt down those libraries yourself.
steve_v
 
Posts: 695
Joined: 2012-10-06 05:31
Location: New Zealand

Re: Can't open Firefox

Postby pawRoot » 2018-02-02 04:46

steve_v wrote:Use 'ldd' on your binary to find the libraries it's linked against, then use look for packages that provide them via dpkg, apt-file etc.


Ok thanks will give it a try.

steve_v wrote:That's the advantage of using distro provided packages, you don't have to hunt down those libraries yourself.


But then you have to use software from ancient Egypt times.
Firefox from stable repos is useless to me, doesn't work properly with some GTK themes and with most extensions.
User avatar
pawRoot
 
Posts: 507
Joined: 2016-12-28 18:26
Location: Poland

Re: Can't open Firefox

Postby None1975 » 2018-02-02 14:56

You might want to change Firefox to Chromium...
OS: Debian 9.4 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 481
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Can't open Firefox

Postby stevepusser » 2018-02-02 18:13

Mozilla tells you what you need to have installed to run the current Firefox. I just utter the magic incantation

Code: Select all
mozilla firefox linux requirements
to the Google demon, and it returns https://www.mozilla.org/en-US/firefox/5 ... uirements/ as the first result:

Firefox will not run at all without the following libraries or packages:

GTK+ 3.4 or higher
GLib 2.22 or higher
Pango 1.14 or higher
X.Org 1.0 or higher (1.7 or higher is recommended)
libstdc++ 4.6.1 or higher


Debian's GTK+ 3 is libgtk-3-0. It will bring in cairo, pango, glib, etc., automatically.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.2, Pale Moon 27.9.3, wine-staging 3.10, QuiteRSS 0.18.11, Linux kernel 4.17, Krita 4.0.4
User avatar
stevepusser
 
Posts: 9648
Joined: 2009-10-06 05:53

Re: Can't open Firefox

Postby steve_v » 2018-02-03 02:36

None1975 wrote:You might want to change Firefox to Chromium...

Eugh. Why would I want google software on my box?
steve_v
 
Posts: 695
Joined: 2012-10-06 05:31
Location: New Zealand

Re: Can't open Firefox

Postby None1975 » 2018-02-03 13:28

steve_v wrote:Eugh. Why would I want google software on my box?

Check this.
OS: Debian 9.4 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 481
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius

Re: Can't open Firefox

Postby pawRoot » 2018-02-03 13:31

None1975 wrote:
steve_v wrote:Eugh. Why would I want google software on my box?

Check this.


Chromium is useless for me, doesn't work with Netflix, Spotify and some other websites.
User avatar
pawRoot
 
Posts: 507
Joined: 2016-12-28 18:26
Location: Poland

Re: Can't open Firefox

Postby debiman » 2018-02-04 20:43

None1975 wrote:
steve_v wrote:Eugh. Why would I want google software on my box?

Check this.

yes, i am aware of the differences.
nevertheless even 100% FOSS chromium is still essesntially google's child.
several projects to "ungoogle" chromium exist, e.g. https://github.com/Eloston/ungoogled-chromium
User avatar
debiman
 
Posts: 2408
Joined: 2013-03-12 07:18

Re: Can't open Firefox

Postby None1975 » 2018-02-05 16:42

Thank you, debiman, for the info.
OS: Debian 9.4 / WM: Xmonad
Debian Wiki | DontBreakDebian, My config files in github
Linux User #607425
User avatar
None1975
 
Posts: 481
Joined: 2015-11-29 18:23
Location: Lithuania, Vilnius


Return to General Questions

Who is online

Users browsing this forum: tcat and 7 guests

fashionable