[SOLVED] Script built Vivaldi installed unintentionally as root with installpkg.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Script built Vivaldi installed unintentionally as root with installpkg.
I have very little practical experience with Slackware... I have a new 14.2 install on a laptop. I used a script to build Vivaldi browser and installed it with installpkg: https://gist.github.com/ruario/dcbba...cc883542ff7ace
As I haven't been able to get it to run, I ran an
Code:
$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?
Last edited by globetrotterdk; 03-14-2018 at 06:49 PM.
I have very little practical experience with Slackware... I have a new 14.2 install on a laptop. I used a script to build Vivaldi browser and installed it with installpkg: https://gist.github.com/ruario/dcbba...cc883542ff7ace
As I haven't been able to get it to run, I ran an
Code:
$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?
what is the execuable name?
Code:
/opt/Vivaldi/vivaldi(executable)
on your command line if it starts. then look for the desktop file and copy it into
Code:
/usr/share/applications
though it would be wise to open it under root.
Code:
sudo nano Vivaldi.desktop
then find the line in the file
Code:
// here goes the absolute path and executable name
// in Exec
Exec=/opt/Vivaldi/vivaldi
keeping in mind what I wrote is only an example of what it needs to be.
Code:
-rwxr-xr-x 1 root root 140748848 Feb 26 2017 /opt/blender/blender
permissions on /opt
everyone can execute a app from /opt/ the x tells you that.
owner, group, other are all getting the x
Thanks for the reply BW-userx. Here is what things look like in /opt and /vivaldi:
Code:
$ cd /opt
bash-4.3$ ls -l
total 4
drwxr-xr-x 7 root root 4096 Mar 14 23:12 vivaldi
bash-4.3$ cd vivaldi
bash-4.3$ ls -l
total 151192
drwxr-xr-x 2 root root 4096 Feb 27 03:17 cron
-rw-r--r-- 1 root root 812 Feb 27 03:17 features.json
-rw-r--r-- 1 root root 10170896 Feb 27 03:17 icudtl.dat
drwxr-xr-x 2 root root 4096 Feb 27 03:17 lib
-rw-r--r-- 1 root root 2878720 Mar 14 23:12 libffmpeg.so
lrwxrwxrwx 1 root root 36 Mar 14 22:28 libwidevinecdm.so -> /opt/google/chrome/libwidevinecdm.so
-rw-r--r-- 1 root root 432312 Feb 27 03:17 libwidevinecdmadapter.so
drwxr-xr-x 2 root root 4096 Feb 27 03:17 locales
-rw-r--r-- 1 root root 218121 Feb 27 03:17 natives_blob.bin
-rw-r--r-- 1 root root 4672 Feb 27 03:17 product_logo_128.png
-rw-r--r-- 1 root root 520 Feb 27 03:17 product_logo_16.png
-rw-r--r-- 1 root root 527 Feb 27 03:17 product_logo_22.png
-rw-r--r-- 1 root root 573 Feb 27 03:17 product_logo_24.png
-rw-r--r-- 1 root root 9421 Feb 27 03:17 product_logo_256.png
-rw-r--r-- 1 root root 1165 Feb 27 03:17 product_logo_32.png
-rw-r--r-- 1 root root 1602 Feb 27 03:17 product_logo_32.xpm
-rw-r--r-- 1 root root 1690 Feb 27 03:17 product_logo_48.png
-rw-r--r-- 1 root root 2274 Feb 27 03:17 product_logo_64.png
drwxr-xr-x 3 root root 4096 Feb 27 03:17 resources
-rw-r--r-- 1 root root 12511893 Feb 27 03:17 resources.pak
-rw-r--r-- 1 root root 1358436 Feb 27 03:17 snapshot_blob.bin
drwxr-xr-x 2 root root 4096 Feb 27 03:17 swiftshader
-rwxr-xr-x 1 root root 3426 Feb 27 03:17 vivaldi
-rwxr-xr-x 1 root root 125209048 Feb 27 03:17 vivaldi-bin
-rwxr-xr-x 1 root root 19504 Feb 27 03:17 vivaldi-sandbox
-rw-r--r-- 1 root root 824509 Feb 27 03:17 vivaldi_100_percent.pak
-rw-r--r-- 1 root root 1101306 Feb 27 03:17 vivaldi_200_percent.pak
The Vivaldi browser will not execute and there is no feedback of any kind. I know that this build works on a Salix OS system, so if it isn't a permission issue, that would suggest that I am missing something on my system. My Slackware system was installed excluding KDE, but I went through the install in "expert" mode to try to make sure that I included everything that would be normal "gotchas", such as PyQT.
----
Code:
$ vivaldi
bash: vivaldi: command not found
Last edited by globetrotterdk; 03-15-2018 at 03:21 AM.
//Step 1 copy script into another file then make it executable
userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ chmod +x latest-Vivaldi
//step 2 run same script
userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ ./latest-Vivaldi
Downloading Vivaldi 1.14.1077.55 for x86_64
ca chunk Ka Chunk compiling
....
//step 3 install results
Slackware package "/tmp/vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz" created.
userx@slackwhere101:~/scripts/LQ/latest-Vivaldi
$ sudo installpkg /tmp/vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz
Verifying package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz.
Installing package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz:
PACKAGE DESCRIPTION:
# vivaldi-stable (Vivaldi web browser)
#
# Vivaldi browser is made with power users in mind by people who love
# the Web.
#
# Homepage: https://vivaldi.com
#
Executing install script for vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz.
Package vivaldi-stable-1.14.1077.55-x86_64-1ro.tgz installed.
//step 4 find where it went.
$ ls /opt
blender dropbox share vivaldi
//step 5 go there
cd /opt/vivaldi
//step 6 find the executable
userx@slackwhere101:/opt/vivaldi
$ ls
cron product_logo_16.png resources.pak
features.json product_logo_22.png snapshot_blob.bin
icudtl.dat product_logo_24.png swiftshader
lib product_logo_256.png vivaldi
libwidevinecdm.so product_logo_32.png vivaldi-bin
libwidevinecdmadapter.so product_logo_32.xpm vivaldi-sandbox
locales product_logo_48.png vivaldi_100_percent.pak
natives_blob.bin product_logo_64.png vivaldi_200_percent.pak
product_logo_128.png resources
//step 7 run the executable
userx@slackwhere101:/opt/vivaldi
$ ./vivaldi
No suitable library for HTML5 MP4 (H.264/AAC) video and MP3 audio was
found, therefore only open codecs will play.
For assistance on how to enable proprietary media, visit:
https://help.vivaldi.com/article/html5-mp4-h-264aac-video-and-mp3-audio-support-under-linux/
Works for me.
you can soft link it to /usr/bin or /usr/local/bin if you want to even. and even put a desktop file for it in ../applications
Hmm. OK, the problem probably is that I created the package on a Salix64 system and installed it on my Slackware 14.2 running laptop. I tried running:
Code:
# removepkg vivaldi
No such package: /var/log/packages/vivaldi. Can't remove.
so that I could try building and install it on Slackware. How do I remove the package?
Code:
ls /var/log/packages | grep vivaldi
then if you get a return on that.
Code:
sudo removepkg the entire file name off of your return
can you mix salix with slack? I know salix can use slack but is it ambidextrous between the two?
anyways .. it wouldn't hurt to remove it then installed right off of slack. It does not take that much time to do.
New Vivaldi install completed without problems. However:
Code:
$ vivaldi-stable
[3201:3239:0315/151338.399968:FATAL:nss_util.cc(631)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted
Code:
# slackpkg search NSS
Looking for NSS in package list. Please wait... DONE
No package name matches the pattern.
Code:
# sbopkg -s NSS
Searching for NSS
sbopkg: package "NSS" not found.
----
I found the answer. I needed to run:
Code:
# slackpkg upgrade mozilla-nss-3.31.1
Vivaldi is now running Thanks for all the help.
Last edited by globetrotterdk; 03-15-2018 at 09:30 AM.
New Vivaldi install completed without problems. However:
Code:
$ vivaldi-stable
[3201:3239:0315/151338.399968:FATAL:nss_util.cc(631)] NSS_VersionCheck("3.26") failed. NSS >= 3.26 is required. Please upgrade to the latest NSS, and if you still get this error, contact your distribution maintainer.
Aborted
Code:
# slackpkg search NSS
Looking for NSS in package list. Please wait... DONE
No package name matches the pattern.
Code:
# sbopkg -s NSS
Searching for NSS
sbopkg: package "NSS" not found.
----
I found the answer. I needed to run:
Code:
# slackpkg upgrade mozilla-nss-3.31.1
I'm finding all kinds of things for nss using sbofind nss -r
use lower case in your search. it's probably a lib files there is too many here for me to get a definite idea which to use though. I have to have whatever it needs in nss already installed from something else I have installed on my system. Then again I never looked at my messages after it was done.
though I am actually using it right now posting this to you.
so you should have a desktop already. what WindowManager you running? XFCE4 and such should pick it up and put it in their menu. whereas fluxbox, WMaker will not.
EDIT:
I lied due to misinformation. It is not there. It is located here
Hmm. OK, the problem probably is that I created the package on a Salix64 system and installed it on my Slackware 14.2 running laptop
This is your primary problem. You cannot run 64bit binaries on 32bit.
The second issue seems to be that you are not keeping your distro up to date and hence had old NSS libs. This is a security issue as well, so you want to keep an eye on that.
Perhaps you want to update your first post explaining it was simply a case of installing the wrong architecture and having an outdated system. I suggest this because this thread a very confusing read and generally gives the impression there is something very wrong with my packaging script, when there isn't.
While I am here I also want to address some other things. Many of them seem to have been worked out by BW-userx (or you) along the way but just to summerise again to be 100% clear.
Quote:
Originally Posted by globetrotterdk
I ran an
Code:
$ ls -l
in /opt and discovered that it is owned by root. I could use removepkg to remove it, but I expect that it would again be installed owned as root when I install it again. What am I doing wrong?
Nothing, it should be root owned
Quote:
Originally Posted by BW-userx
what is the execuable name?
Code:
/opt/Vivaldi/vivaldi(executable)
It is “/opt/vivaldi/vivaldi” (note the lower case). There is also a symlink in /usr/bin and that is what the .desktop file points to.
Quote:
Originally Posted by BW-userx
then look for the desktop file and copy it into
Code:
/usr/share/applications
It is already there as “/usr/share/applications/vivaldi-stable.desktop” and contains “Exec=/usr/bin/vivaldi-stable %U”
Quote:
Originally Posted by globetrotterdk
Code:
$ vivaldi
bash: vivaldi: command not found
That is because it is the wrong command. After typing “vivaldi” presssing tab would have autocompleted from the name of symlink in “/usr/bin”, i.e. vivaldi-stable
Quote:
Originally Posted by globetrotterdk
Code:
# ./vivaldi-bin
bash: ./vivaldi-bin: No such file or directory
Because you are not in “/opt/vivaldi/” when you type it.
It would be the wrong way to start anyway, since you bypass the startup wrapper which does some tests and sets up variables.
Quote:
Originally Posted by BW-userx
you can soft link it to /usr/bin or /usr/local/bin if you want to even. and even put a desktop file for it in ../applications
No need since a symlink is already setup and there is a desktop file already present and working.
Quote:
Originally Posted by globetrotterdk
Code:
# removepkg vivaldi
No such package: /var/log/packages/vivaldi. Can't remove.
so that I could try building and install it on Slackware. How do I remove the package?
Use the correct package name (vivaldi-stable)
Quote:
Originally Posted by BW-userx
[…]did not get any kind of nss errors did see this though,
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.