自 2021 年 1 月 25 日起,Google Chrome 无法打开。

自 2021 年 1 月 25 日起,Google Chrome 无法打开。

两天前,我发现无法打开我的第二大浏览器 Google Chrome。就像所有打开的浏览器一样,双击应用程序图标后,它开始旋转。然后大约 30 秒后,它就停止了。

我通过以下方式卸载并重新安装:

$ sudo apt update
$ wget https://dl.google.com/linux/direct/g...rent_amd64.deb
--2021-01-24 12:13:53-- https://dl.google.com/linux/direct/g...rent_amd64.deb
Resolving dl.google.com (dl.google.com)... 74.125.193.190, 74.125.193.91, 74.125.193.136, ...
Connecting to dl.google.com (dl.google.com)|74.125.193.190|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 72800524 (69M) [application/x-debian-package]
Saving to: ‘google-chrome-stable_current_amd64.deb’

google-chrome-stable 100%[===================>] 69.43M 7.17MB/s in 10s

2021-01-24 12:14:07 (6.71 MB/s) - ‘google-chrome-stable_current_amd64.deb’ saved [72800524/72800524]

$ sudo dpkg -i google-chrome-stable_current_amd64.deb
Selecting previously unselected package google-chrome-stable.
(Reading database ... 259677 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (88.0.4324.96-1) ...
Setting up google-chrome-stable (88.0.4324.96-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu2) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...

然后我尝试从 CLI 启动 Chrome

$ google-chrome
/usr/bin/google-chrome: line 8: /usr/bin/readlink: Permission denied
/usr/bin/google-chrome: line 10: /usr/bin/dirname: Permission denied
/usr/bin/google-chrome: line 45: /usr/bin/cat: Permission denied
/usr/bin/google-chrome: line 45: /usr/bin/cat: Success
/usr/bin/google-chrome: line 46: /usr/bin/cat: Permission denied
/usr/bin/google-chrome: line 46: /usr/bin/cat: Success

什么也没有发生...

我复制了 /usr/bin/google-chrome 的第 8 行和第 10 行:

1 #!/bin/bash
2 #
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # Let the wrapped binary know that it has been run through the wrapper.
8 export CHROME_WRAPPER="`readlink -f "$0"`"
9
10 HERE="`dirname "$CHROME_WRAPPER"`"

不确定这里出了什么问题。

答案1

当某些东西干扰 Chrome 读取缓存文件的能力时,就会发生这种情况。奇怪的是,这似乎是 Chrome 本身的问题,因为缓存文件不是任何人都会手动操作的东西。您可以通过重命名/删除目录来测试是否是这种情况~/.config/google-chrome。在本练习中,我们只需重命名:

mv ~/.config/google-chrome ~/.config/google-chrome-old

现在启动 Chrome。

如果此操作有效,您会注意到您的偏好设置和书签“消失了”。如果您将它们与 Google 同步,只需再次登录即可。如果您将它们保留在本地,则需要查看新目录和旧目录之间是否存在文件权限差异,使用chown和/或进行必要的更改chmod,然后将一些文件复制回来。

希望这可以帮助

相关内容