使用宽铬的Debian软件包


10

从至少Debian 9(拉伸)开始,Debian包含contrib软件包 chromium-widevine。该软件包的描述是:

该软件包为Widevine内容解密模块提供支持。

但是,安装此软件包后,我找不到Chromium识别或正在加载此插件的任何迹象。Widevine在此包装中的位置是/usr/lib/chromium/libwidevinecdmadapter.so

我当前使用此软件包的目的是在Chromium上播放Amazon Prime Video。目前,我收到错误消息:

您的网络浏览器缺少数字版权组件。转到chrome:// components,然后在WidevineCdm下,点击检查更新。

chrome:// components没有在Chromium下列出WidevineCdm。

更奇怪的是,我得到:

root@orwell:/usr/lib/chromium# ldd libwidevinecdmadapter.so 
        linux-vdso.so.1 (0x00007ffccbfad000)
        libwidevinecdm.so => not found
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f08c6e5b000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f08c6ad3000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f08c6733000)
        /lib64/ld-linux-x86-64.so.2 (0x000055e84bdbe000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f08c642b000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f08c6213000)

那么libwidevinecdm.so什么也解决不了?

知道我应该在这里做什么吗?在chromium-widevine没有任何文件或指示一个应该如何进行。

注意:这个问题已经过时了,至少从Debian 10 / buster起已经过时了,因为宽铬铬包装不再存在。


如果软件包中没有文档,则提交错误报告以说明该问题。IMO,这至少是一个“重要”(甚至可能是“严重”)严重性级别的错误。
cas

Answers:


9

我没有chromium-widevine在contrib repo的debian 9.3上使用netflix的运气。我所做的是:

wget https://dl.google.com/widevine-cdm/1.4.8.1008-linux-x64.zip
unzip 1.4.8.1008-linux-x64.zip
sudo mkdir /usr/lib/chromium
sudo mv libwidevinecdm.so /usr/lib/chromium
sudo chmod 644 /usr/lib/chromium/libwidevinecdm.so

只是要清楚一点,这个食谱对您有用吗?
Faheem Mitha

1
是的,现在就在debian 9.3的铬版上观看netflix :)
a_z

谢谢你的确认。我将尝试这种方法。虽然我想知道为什么Debian软件包不起作用。
Faheem Mitha


3
我刚刚在Mint 19.2上尝试过。使用Chromium 76,但效果不佳。
Bernd Wechner '19

0

Debian声明官方发行版中包括的所有软件包都是免费软件,但Widevine CDM库不在此类别中。不过,Chrome参考版本中有一个二进制Blob 。


但是,包含这样的软件包(没有参考如何使用)并不是非常有用。我添加了一个链接,/usr/lib/chromium# ln -s /opt/google/chrome/libwidevinecdm.so .现在Prime Video并没有抱怨“缺少数字版权组件”,但是它也不起作用。它会收到与Google Chrome本身相同的错误,该错误目前也不起作用。
Faheem Mitha

@FaheemMitha Chrome是两者中更可能起作用的工具。您知道为什么会出现问题吗?
Fox

嗨,福克斯。不,我不知道 一直工作到最近。但是我认为最近有升级。
Faheem Mitha

0

我已经更新了Arch Linux上的脚本,可以下载并安装Widevine中的铬。您只需要更新铬安装目录的路径即可。主要区别在于,它还将安装下载的归档文件中包含的清单,并且这种方式可以通过Chrome中的chrome:// components显示宽屏版本。这里是:

#!/bin/sh

# For ARM use this instead
# https://gist.github.com/ruario/19a28d98d29d34ec9b184c42e5f8bf29

available () {
  command -v "$1" >/dev/null 2>&1
}

# Make sure we have wget or curl
if available wget; then
  SILENT_DL="wget -qO-"
  LOUD_DL="wget"
elif available curl; then
  SILENT_DL="curl -s"
  LOUD_DL="curl -O"
else
  echo "Install wget or curl" >&2
  exit 1
fi

# Set Output dir
#WIDEVINE_DIR="${WIDEVINE_INSTALL_DIR:-/opt/google/chrome}"
#WIDEVINE_DIR="${WIDEVINE_INSTALL_DIR:-/usr/lib/chromium}"
WIDEVINE_DIR="${WIDEVINE_INSTALL_DIR:-/usr/lib/chromium-browser}"

# Use the architecture of the current machine or whatever the user has set
# externally
ARCH="${ARCH:-$(uname -m)}"
case "$ARCH" in
  x86_64) WIDEVINE_ARCH="x64" 
          WIDEVINE_INSTALL_DIR="$WIDEVINE_DIR/WidevineCdm/_platform_specific/linux_x64" ;;
    i?86) WIDEVINE_ARCH="ia32" 
          WIDEVINE_INSTALL_DIR="$WIDEVINE_DIR/WidevineCdm/_platform_specific/linux_x86" ;;
    arm*) echo "For ARM use https://gist.github.com/ruario/19a28d98d29d34ec9b184c42e5f8bf29 instead" >&2 ; exit 1 ;;
       *) echo "The architecture $ARCH is not supported." >&2 ; exit 1 ;;
esac

# Set temp dir
TMP="${TMP:-/tmp}"

# Set staging dir
STAGINGDIR="$TMP/widevine-staging"

# Work out the latest Widevine version
#WIDEVINE_VERSION="${WIDEVINE_VERSION:-$($SILENT_DL https://dl.google.com/widevine-cdm/current.txt)}"
WIDEVINE_VERSION="${WIDEVINE_VERSION:-$($SILENT_DL https://dl.google.com/widevine-cdm/versions.txt | tail -n1)}"
echo latest Version: $WIDEVINE_VERSION

# Error out if $CDMVERISON is unset, e.g. because previous command failed
if [ -z "$WIDEVINE_VERSION" ]; then
  echo "Could not work out the latest version; exiting" >&2
  exit 1
fi

# Find current installed version
INSTALLED_VERSION=$(grep '"version":' $WIDEVINE_DIR/WidevineCdm/manifest.json|cut -f4 -d'"')

# Don't start repackaging if the same version is already installed
if [ $WIDEVINE_VERSION = $INSTALLED_VERSION ]; then
  echo "The latest Widevine ($WIDEVINE_VERSION) is already installed"
  exit 0
fi

# If the staging directory is already present from the past, clear it down and
# re-create it.
if [ -d "$STAGINGDIR" ]; then
  rm -fr "$STAGINGDIR"
fi

# Stop on any error
set -eu

# Make and switch to the staging directory
mkdir -p "$STAGINGDIR"
cd "$STAGINGDIR"

# Now get the latest widevine zip for the users architecture
$LOUD_DL "https://dl.google.com/widevine-cdm/${WIDEVINE_VERSION}-linux-${WIDEVINE_ARCH}.zip"

# Extract the contents of Widevine package
if available unzip; then
  unzip "${WIDEVINE_VERSION}-linux-${WIDEVINE_ARCH}.zip" libwidevinecdm.so
  unzip "${WIDEVINE_VERSION}-linux-${WIDEVINE_ARCH}.zip" manifest.json 
elif available bsdtar; then
  bsdtar xf "${WIDEVINE_VERSION}-linux-${WIDEVINE_ARCH}.zip" libwidevinecdm.so
  bsdtar xf "${WIDEVINE_VERSION}-linux-${WIDEVINE_ARCH}.zip" manifest.json
else
  # The user's system has no obvious handler for Zip files. GZip can extract
  # the first entry from a Zip. If libwidevinecdm.so is the first entry, we
  # might just pull this off! ;)
  missing_extractor_error () {
    echo "Install InfoZip Unzip or BSD tar" >&2
    exit 1
  }
  # Look in first 50 bytes for libwidevinecdm.so as it'll be mentioned there
  # if it is the first entry in the zip
  if head -c50 "${WIDEVINE_VERSION}-linux-${WIDEVINE_ARCH}.zip" | grep -Fq libwidevinecdm.so; then
    # Hide the warning about multiple entries and ensure an exit code of 0
    gzip -d < "${WIDEVINE_VERSION}-linux-${WIDEVINE_ARCH}.zip" > libwidevinecdm.so 2> /dev/null ||:
    # Check that it looks like an executable
    if ! file libwidevinecdm.so | grep -Fq ELF; then
      missing_extractor_error
    fi
  else
    missing_extractor_error
  fi
fi

# Add version number file
#touch "widevine-$WIDEVINE_VERSION"
#SED_PAR="s/\"version\": \".*\"/\"version\": \"$WIDEVINE_VERSION\"/"
#if [ -e $WIDEVINE_DIR/WidevineCdm/manifest.json ]; then
#  sed $WIDEVINE_DIR/WidevineCdm/manifest.json -e "$SED_PAR" >$STAGINGDIR/manifest.json
#fi

# Escalate privileges if needed and copy files into place
#SED_PAR="s/\"version\": \".*\"/\"version\": \"$WIDEVINE_VERSION\"/"
if [ "$USER" = "root" ]; then
  install -Dm644 libwidevinecdm.so "$WIDEVINE_INSTALL_DIR/libwidevinecdm.so"
  if [ -e $STAGINGDIR/manifest.json ]; then
#     mv $WIDEVINE_DIR/WidevineCdm/manifest_neu.json $WIDEVINE_DIR/WidevineCdm/manifest.json
     install -Dm644 manifest.json "$WIDEVINE_DIR/WidevineCdm/manifest.json"
  fi
elif [ -r /etc/os-release ] && grep -qxE 'ID=((ubuntu)|(debiiian))' /etc/os-release; then
  echo "Calling sudo ... If prompted, please enter your password so Widevine can be copied into place"
  sudo  install -Dm644 libwidevinecdm.so "$WIDEVINE_INSTALL_DIR/libwidevinecdm.so"
  if [ -e "$WIDEVINE_INSTALL_DIR/libwidevinecdm.so" ]; then
    if [ -e $STAGINGDIR/manifest.json ]; then
      sudo install -Dm644 manifest.json "$WIDEVINE_DIR/WidevineCdm/manifest.json"
    fi
  else
    echo "Something went wrong installing libwidevinecdm.so" >&2
    exit 1
  fi
else
  echo "Please enter your root password so Widevine can be copied into place"
  su -c "sh -c \"install -Dm644 libwidevinecdm.so $WIDEVINE_INSTALL_DIR/libwidevinecdm.so && install -Dm644 manifest.json $WIDEVINE_DIR/WidevineCdm/manifest.json\""
fi

# Tell the user we are done
echo "Widevine ($WIDEVINE_VERSION) installed into $WIDEVINE_INSTALL_DIR/"
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.