2

I want to install a particular version of Chrome from the official Google's repository. This is how I install Chrome now:

RUN apt-get update \
    && apt-get install -y wget gnupg \
    && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
    && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
    && apt-get update \
    && apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-khmeros fonts-kacst fonts-freefont-ttf libxss1 \
      --no-install-recommends \
    && rm -rf /var/lib/apt/lists/*

As I undersand, this is the repository entry:

http://dl.google.com/linux/chrome/deb/ stable main

according to the format described here:

deb http://site.example.com/debian distribution component1 component2 component3

So here it uses stable as distribution, and main as a component. Stable is supposed to the version, but maybe it's a metapackage that points to the latest? But I can't figure out how to see what versions are available in this repository?

When I install it I see the following output, particularly this line:

The following packages will be upgraded:
  google-chrome-stable
1 upgraded, 0 newly installed, 0 to remove and 52 not upgraded.
Need to get 105 MB of archives.
After this operation, 3688 kB of additional disk space will be used.
Get:1 https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 120.0.6099.71-1 [105 MB]

so it somehow knows that the latest is 120.0.6099.71-1 and the repository link becomes this:

https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 120.0.6099.71-1

1 Answer 1

3

That doesn't seem to be a meta-package per-se ... compare the output (Depends: part in particular) of:

$ apt show -a google-chrome-stable
Package: google-chrome-stable
Version: 120.0.6099.71-1
Priority: optional
Section: web
Maintainer: Chrome Linux Team <[email protected]>
Installed-Size: 338 MB
Provides: www-browser
Pre-Depends: dpkg (>= 1.14.0)
Depends: ca-certificates, fonts-liberation, libasound2 (>= 1.0.17), libatk-bridge2.0-0 (>= 2.5.3), libatk1.0-0 (>= 2.2.0), libatspi2.0-0 (>= 2.9.90), libc6 (>= 2.17), libcairo2 (>= 1.6.0), libcups2 (>= 1.6.0), libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3, libdbus-1-3 (>= 1.9.14), libdrm2 (>= 2.4.75), libexpat1 (>= 2.1~beta3), libgbm1 (>= 17.1.0~rc2), libglib2.0-0 (>= 2.39.4), libgtk-3-0 (>= 3.9.10) | libgtk-4-1, libnspr4 (>= 2:4.9-2~), libnss3 (>= 2:3.35), libpango-1.0-0 (>= 1.14.0), libu2f-udev, libvulkan1, libx11-6 (>= 2:1.4.99.1), libxcb1 (>= 1.9.2), libxcomposite1 (>= 1:0.4.4-1), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxkbcommon0 (>= 0.5.0), libxrandr2, wget, xdg-utils (>= 1.0.2)
Download-Size: 105 MB
APT-Manual-Installed: yes
APT-Sources: https://dl.google.com/linux/chrome/deb stable/main amd64 Packages
Description: The web browser from Google
 Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier.

to the output of an actual meta-package like:

$ apt show -a linux-image-generic
Package: linux-image-generic
Version: 6.5.0.14.16
Priority: optional
Section: kernel
Source: linux-meta
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 15.4 kB
Provides: spl-modules (= 2.2.0-0ubuntu1~23.10), v4l2loopback-modules (= 0.12.7-2ubuntu4), virtualbox-guest-modules (= 6.5.0-14), wireguard-modules (= 1.0.0), zfs-modules (= 2.2.0-0ubuntu1~23.10)
Depends: linux-image-6.5.0-14-generic, linux-modules-extra-6.5.0-14-generic, linux-firmware, intel-microcode, amd64-microcode
Recommends: thermald
Download-Size: 9,026 B
APT-Manual-Installed: yes
APT-Sources: http://archive.ubuntu.com/ubuntu mantic-updates/main amd64 Packages
Description: Generic Linux kernel image
 This package will always depend on the latest generic kernel image
 available.

Package: linux-image-generic
Version: 6.5.0.9.11
Priority: optional
Section: kernel
Source: linux-meta
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 15.4 kB
Provides: spl-modules (= 2.2.0~rc3-0ubuntu4), v4l2loopback-modules (= 0.12.7-2ubuntu4), virtualbox-guest-modules (= 6.5.0-9), wireguard-modules (= 1.0.0), zfs-modules (= 2.2.0~rc3-0ubuntu4)
Depends: linux-image-6.5.0-9-generic, linux-modules-extra-6.5.0-9-generic, linux-firmware, intel-microcode, amd64-microcode
Recommends: thermald
Download-Size: 8,892 B
APT-Sources: http://archive.ubuntu.com/ubuntu mantic/main amd64 Packages
Description: Generic Linux kernel image
 This package will always depend on the latest generic kernel image
 available.

... as you can see the former shows real dependencies on other different packages not among which a google-chrome* package so not a meta-package by this definition while the latter lists dependency on a certain version of itself so a meta-package by this definition (in layman's terms, that is)

That said, you can search available packages from added repositories like this:

$ apt search '^google-chrome.*'
Sorting... Done
Full Text Search... Done
google-chrome-beta/stable 121.0.6167.8-1 amd64
  The web browser from Google

google-chrome-stable/stable,now 120.0.6099.71-1 amd64 [installed]
  The web browser from Google

google-chrome-unstable/stable 121.0.6156.3-1 amd64
  The web browser from Google

or like this:

$ apt list 'google-chrome*'
Listing... Done
google-chrome-beta/stable 121.0.6167.8-1 amd64
google-chrome-stable/stable,now 120.0.6099.71-1 amd64 [installed]
google-chrome-unstable/stable 121.0.6156.3-1 amd64

or alternatively search text in the related repository cached list of packages file under /var/lib/apt/lists/ (gets updated with sudo apt update) like for example:

$ awk '/^Package: |^Version: |^Architecture: / {
        print
}

/^Filename: / {
        printf "%s\n\n", $0
}
' /var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-amd64_Packages 
Package: google-chrome-beta
Version: 121.0.6167.8-1
Architecture: amd64
Filename: pool/main/g/google-chrome-beta/google-chrome-beta_121.0.6167.8-1_amd64.deb

Package: google-chrome-stable
Version: 120.0.6099.71-1
Architecture: amd64
Filename: pool/main/g/google-chrome-stable/google-chrome-stable_120.0.6099.71-1_amd64.deb

Package: google-chrome-unstable
Version: 121.0.6156.3-1
Architecture: amd64
Filename: pool/main/g/google-chrome-unstable/google-chrome-unstable_121.0.6156.3-1_amd64.deb

... where Filename: is the actual file path under that repository i.e. for example the stable Google Chrome package file is at:

https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_120.0.6099.71-1_amd64.deb
5
  • thanks for your elaborate answer! so once I know there's version 121.0.6167.8-1, how do I go about installing it? sudo apt install google-chrome-stable=121.0.6167.8-1 reported that package is not found. On a separate note, I'm not much famiilar with debian repositories, is there some kind of convention how long a package is kept in a repository? or each repository owner decides for themselves? Dec 9, 2023 at 14:52
  • 1
    @MaxKoretskyi Version 121.0.6167.8-1 is listed for package name google-chrome-beta so you can only use it with that ... The only version listed for google-chrome-stable is 120.0.6099.71-1 and therefore only apt install google-chrome-stable=120.0.6099.71-1 would work although not much of a big help in this case as there are no multiple versions available to choose from and as it seems Google doesn't offer older google-chrome* versions for install or keep them in their repository ... So, just apt install google-chrome-stable would be future proof when a newer version is released...
    – Raffa
    Dec 9, 2023 at 15:44
  • 1
    @MaxKoretskyi As for how long a certain version is kept in a certain repository, it's more like "each repository owner decides for themselves" and Google seems to not keep but the single current browser version for each branch ... You can however download the current version and save it on a local path and install it locally from there with e.g. apt install /path/to/google-chrome-stable_120.0.6099.71-1_amd64.deb and APT will install its dependencies as well ... But that would expose it to future vulnerabilities without fixes so not recommended in a production environment at all ...
    – Raffa
    Dec 9, 2023 at 15:52
  • 1
    @MaxKoretskyi It might be worth noting that Google might provide other versioning options for certain products targeted to e.g. enterprise or education and some of them are payed services ... I however don't know if the browser is made available among those.
    – Raffa
    Dec 9, 2023 at 15:55
  • all clear, thanks a lot for your explanation! Dec 9, 2023 at 19:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .