Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpm requires libappindicator #442

Closed
2 tasks done
alicengiz opened this issue May 9, 2017 · 11 comments
Closed
2 tasks done

rpm requires libappindicator #442

alicengiz opened this issue May 9, 2017 · 11 comments

Comments

@alicengiz
Copy link

My Setup

  • My OS name and version: openSUSE Leap 42.2
  • My current app version: 2.3.0
  • I have tested with the latest application version
  • I can simulate the issue easily

Description

I've just tried to install desktop application version 2.7.0. I could not install because of "libappindicator" package require.

Current Behavior

$ sudo zypper in rocketchat-desktop-2.7.0.rpm
Problem: nothing provides libappindicator needed by rocketchat-desktop-2.7.0-1.x86_64
Solution 1: do not install rocketchat-desktop-2.7.0-1.x86_64
Solution 2: break rocketchat-desktop-2.7.0-1.x86_64 by ignoring some of its dependencies

I've checked libappindicator package for opensuse is installed.

$ zypper se libappindicator
S | Name | Summary | Type
--+------------------------+--------------------------------------------------------+--------
| libappindicator-devel | Development files for libappindicator | package
| libappindicator-doc | Documentation for libappindicator and libappindicator3 | package
i | libappindicator1 | Application indicators library | package
i | libappindicator3-1 | Application indicators library -- GTK+ 3 | package
| libappindicator3-devel | Development files for libappindicator3 | package

Expected Behavior

Can be installed normally.

@oliver-bowman
Copy link

This is affecting my company too.

@megamaced
Copy link

I ended up building my own RPM for SLES/openSUSE due to this and the fact the package name was reverted from rocketchat-desktop to rocketchat (which conflicted with my Rocketchat server RPM name)

It's not that difficult to do;

sudo zypper in nodejs4 npm4
sudo npm install -g n
sudo n latest

Download the latest Rocketchat client source and extract
In the source dir, do

# change the "name" value to rocketchat-desktop
vi package.json 

Run

/usr/local/bin/node /usr/local/bin/npm install

Edit the file that sets the bad dependencies

vi node_modules/electron-builder/out/targets/fpm.js

Find the following and replace this

                } else if (target === "rpm") {
                    depends = ["libnotify", "libappindicator"];
                } else {
                    depends = [];
                }

With

                } else if (target === "rpm") {
                    depends = ["libnotify4", "libappindicator1"];
                } else {
                    depends = [];
                }

Then run the release to make the RPM

/usr/local/bin/node /usr/local/bin/npm run release

It will probably spit out an error at the end about gitlab api key, but that doesn't matter. The RPM should be made in the dist folder

@albenstein
Copy link

@megamaced I will try that.
But i also get libappindicator1 dependency warning on deb package (2.8.0_amd64) on Kali 2007.1 (Linux kali7 4.9.0-kali4-amd64 #1 SMP Debian 4.9.25-1kali1 (2017-05-04) x86_64 GNU/Linux)

@jdashn
Copy link

jdashn commented May 24, 2017

@megamaced I am just likely an idiot, but following your steps i get an error at
/usr/local/bin/node /usr/local/bin/npm install

the error is the following:
Failed at the @paulcbetts/[email protected] install script 'node-gyp rebuild'

Maybe there is something additional that needs to be installed (i'm doing this from a freshly installed OpenSuse 42.3) on my end? Something i'm doing wrong?

@megamaced
Copy link

@jdashn try npm install node-gyp

and if that doesn't work

sudo npm install -g node-gyp

@jdashn
Copy link

jdashn commented Jun 7, 2017

@megamaced Sorry for the delay!

I have tried that and i am still getting error messages, maybe this will help:

I am starting with Suse Tumbleweed freshly installed (also tried with OpenSuse). No additional packages installed.

sudo zypper in nodejs4 npm4 sudo npm install -g n sudo n latest

The sudo n latest command fails stating:
sudo: n: command not found
if i run gnomesu n latest or just n latest the package updates

I have tried grabbing just the tarball and untaring it and also cloning the repository with git (after git installed)

I cd to the folder

I then run:
sudo npm install -g node-gyp
then i run
/usr/local/bin/node /usr/local/bin/npm install
At this point i get an error:

gyp: Call to 'pkg-config --cflags x11 xext xscrnsaver' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.11.3-1-default
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/jlloyd/RCBuilding/Rocket.Chat.Electron/node_modules/@paulcbetts/system-idle-time
gyp ERR! node -v v8.0.0
gyp ERR! node-gyp -v v3.6.1
gyp ERR! not ok
npm WARN [email protected] requires a peer of ajv@>=5.0.0 but none was installed.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @paulcbetts/[email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @paulcbetts/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/jlloyd/.npm/_logs/2017-06-07T15_42_00_182Z-debug.log

I feel like there is something i'm doing wrong here, something not installed, if you've got any suggestions i'd be super excited!

Thanks!!

@spacefito
Copy link

so the error message is just saying that it cannot find an rpm package called libappindicator.
Probably because it is named something else in the rpm database on your machine.
in my case it is called libappindicator1:
--+------------------------+-------------------------------------------+--------
i | libappindicator-devel | Development files for libappindicator | package
| libappindicator-doc | Documentation for libappindicator and l-> | package
i | libappindicator1 | Application indicators library | package
| libappindicator3-1 | Application indicators library -- GTK+ 3 | package
| libappindicator3-devel | D

so, if you have libappindicator1 installed (like I do), you can "ignore" the error.
If you use something like Yast (for SUSE) you will be able to say something like "ignore dependencies and install package...." or something to that effect.

Then the package will installed and if you have the necessary pacakges installed( again in my case libappindicator1) it should work. It did for me.

@dfisek
Copy link

dfisek commented Oct 22, 2018

Well, can we assume the bug is fixed since it's been closed?

If so, what was the solution?

@tassoevan
Copy link
Collaborator

My bad: I thought it was a issue about rpm installs in general and everything is working on Fedora. Now I see it's a SUSE issue.
Is a custom rpm file for openSUSE the only available option here?

@tassoevan tassoevan reopened this Oct 22, 2018
@dfisek
Copy link

dfisek commented Oct 22, 2018

It's not only an issue in SuSE. It's probably an issue on most distributions that use different package names for the appindicator library (other than Fedora).

Another option is to just remove the dependency from the rpm package and document the dependency so people can manually install it.

@tassoevan
Copy link
Collaborator

Not a fan of this approach (since it's a downer for Fedora users), but it seems that's is the way to go with electron-builder: electron-userland/electron-builder#502
I'll research how other Electron apps solve this before make a final decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants