[SOLVED] how to edit google-chrome script in /extra
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I've been trying out the google-chrome script in /extra on my slackware-current system. I get this error message:
Quote:
root@tomslenevo:/home/tfrei/Downloads/chrome# ./google-chrome.SlackBuild
ar: /home/tfrei/Downloads/chrome/google-chrome-stable_current_i386.deb: No such file or directory
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
I've tried various edits on the script itself to specify that my system is a 64-bit, but with no luck. I imagine the edit has to take place in the following section of the script on the "ARCH=$..." line, but I'm either not getting the syntax right or putting in the wrong value.
Quote:
# Allow $ARCH to be preset before running the script. This is useful in the
# case where someone is running a 32-bit chroot environment under an x86_64
# kernel:
ARCH=${ARCH:-$(uname -m)}
case "$ARCH" in
i?86) DEBARCH="i386" ; LIBDIRSUFFIX="" ; ARCH=i386 ;;
x86_64) DEBARCH="amd64" ; LIBDIRSUFFIX="64" ; ARCH=x86_64 ;;
*) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;;
esac
I got the script to work. I think I was using the wrong syntax and putting in the wrong value. Here is what I did to make the script work for 64-bit. I commented out the default "ARCH=..." line and my edited line follows. Maybe this will help another inexperienced user like myself.
Quote:
# ARCH=${ARCH:-$(uname -m)}
ARCH=${ARCH:-x86_64}
The first line is the original language from the script. The following line is how it should be edited for 64-bit.
You stated in your second post that you were trying to install a 64-bit version of Chrome on your box. Yet, the execution snippet you quoted in your first post read like so:
Code:
root@tomslenevo:/home/tfrei/Downloads/chrome# ./google-chrome.SlackBuild
ar: /home/tfrei/Downloads/chrome/google-chrome-stable_current_i386.deb: No such file or directory
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Take a look at the second line of the code above. The script you were running was expecting a 32-bit file, based on the "i386" in the file name that the ar error message threw. There was actually no need to modify the $ARCH statement, as you did in your second post, since the actual problem wasn't with detecting the architecture of your box. Rather, it was with the file having "i386" in its name rather than "amd64" for the 64-bit version of Chrome. So, the better fix would have been to make sure that the file name in the SlackBuild read like so (quoting the SlackBuild in the Slackware64-current tree):
Code:
PKGNAM=google-chrome
RELEASE=${RELEASE:-stable} # stable, beta, or unstable
# Allow $ARCH to be preset before running the script. This is useful in the
# case where someone is running a 32-bit chroot environment under an x86_64
# kernel:
ARCH=${ARCH:-$(uname -m)}
case "$ARCH" in
i?86) DEBARCH="i386" ; LIBDIRSUFFIX="" ; ARCH=i386 ;;
x86_64) DEBARCH="amd64" ; LIBDIRSUFFIX="64" ; ARCH=x86_64 ;;
*) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;;
esac
# Get the version from the Debian/Ubuntu .deb (thanks to Fred Richards):
VERSION=$(ar p google-chrome-${RELEASE}_current_${DEBARCH}.deb control.tar.gz 2> /dev/null | tar zxO ./control 2> /dev/null | grep Version | awk '{print $2}' | cut -d- -f1)
BUILD=${BUILD:-1}
It looks like you tried to install 64-bit Chrome on your 32-bit Slackware. Does it actually run? Google no longer supports 32-bit architectures anymore AFAIK.
As Eric and montagdude suggest, I am not running 64-bit Slackware. I thought I was, but I was mistaken. I'm going to start over and install the 64-bit version and my guess is that the script will run without a hitch. Sorry for creating so much confusion.
Started over with a fresh install of slackware-current --this time with 64-bit. Everything worked like a champ. The initial problem was created by my own error. I thought I was using 64-bit slackware-current, but I was actually using 32-bit.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.