質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.31%
Google Colaboratory

Google Colaboratoryとは、無償のJupyterノートブック環境。教育や研究機関の機械学習の普及のためのGoogleの研究プロジェクトです。PythonやNumpyといった機械学習で要する大方の環境がすでに構築されており、コードの記述・実行、解析の保存・共有などが可能です。

Chrome

Google Chromeは携帯、テレビ、デスクトップなどの様々なプラットフォームで利用できるウェブブラウザです。Googleが開発したもので、Blink (レンダリングエンジン) とアプリケーションフレームワークを使用しています。

selenium

Selenium(セレニウム)は、ブラウザをプログラムで作動させるフレームワークです。この原理を使うことにより、ブラウザのユーザーテストなどを自動化にすることができます。

Q&A

0回答

469閲覧

Google ColaboratoryにGoogle Chromeの最新版とChromeDriverの最新版がインストールできないです。

atago_IT

総合スコア8

Google Colaboratory

Google Colaboratoryとは、無償のJupyterノートブック環境。教育や研究機関の機械学習の普及のためのGoogleの研究プロジェクトです。PythonやNumpyといった機械学習で要する大方の環境がすでに構築されており、コードの記述・実行、解析の保存・共有などが可能です。

Chrome

Google Chromeは携帯、テレビ、デスクトップなどの様々なプラットフォームで利用できるウェブブラウザです。Googleが開発したもので、Blink (レンダリングエンジン) とアプリケーションフレームワークを使用しています。

selenium

Selenium(セレニウム)は、ブラウザをプログラムで作動させるフレームワークです。この原理を使うことにより、ブラウザのユーザーテストなどを自動化にすることができます。

0グッド

1クリップ

投稿2023/09/24 14:38

編集2023/09/24 14:40

Google Colaboratory上でSeleniumを動かしたいので、

  • Google Chromeの最新版
  • ChromeDriverの最新版

をそれぞれインストールしたいです。
しかし、実行してもエラーが出現します。

前提条件

  • 開発環境はGoogle Colaboratory
  • Seleniumでスクレイピングをしたい。

期待値

  • Google Chromeの最新版とChromeDriverの最新版のインストールを成功させる。
  • 上記二つのバージョンを一致させる。

再現手順

インストール時のコマンド
%%shell sudo apt -y update && sudo apt -y upgrade sudo apt install -y wget curl unzip # Google Chromeの依存関係をインストール sudo apt install libu2f-udev libvulkan1 # ChromeをDL&インストール wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo dpkg -i google-chrome-stable_current_amd64.deb # ChromeDriverをDL&インストール wget -N https://chromedriver.storage.googleapis.com/99.0.4844.84/chromedriver_linux64.zipp -P /tmp/ unzip -o /tmp/chromedriver_linux64.zip -d /tmp/ chmod +x /tmp/chromedriver mv /tmp/chromedriver /usr/local/bin/chromedriver
実行結果
前略 E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). Reading package lists... Done Building dependency tree... Done Reading state information... Done wget is already the newest version (1.21.2-2ubuntu1). curl is already the newest version (7.81.0-1ubuntu1.13). unzip is already the newest version (6.0-26ubuntu3.1). You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: google-chrome-stable : Depends: libu2f-udev but it is not going to be installed Depends: libvulkan1 but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). Reading package lists... Done Building dependency tree... Done Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libu2f-udev : Depends: udev (>= 244) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). --2023-09-24 13:29:01-- https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb Resolving dl.google.com (dl.google.com)... 142.250.99.136, 142.250.99.93, 142.250.99.190, ... Connecting to dl.google.com (dl.google.com)|142.250.99.136|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 103481376 (99M) [application/x-debian-package] Saving to: ‘google-chrome-stable_current_amd64.deb.2’ 中略 dpkg: dependency problems prevent configuration of google-chrome-stable: google-chrome-stable depends on libu2f-udev; however: Package libu2f-udev is not installed. google-chrome-stable depends on libvulkan1; however: Package libvulkan1 is not installed. dpkg: error processing package google-chrome-stable (--install): dependency problems - leaving unconfigured Processing triggers for man-db (2.10.2-1) ... Errors were encountered while processing: google-chrome-stable --2023-09-24 13:29:15-- https://chromedriver.storage.googleapis.com/99.0.4844.84/chromedriver_linux64.zipp Resolving chromedriver.storage.googleapis.com (chromedriver.storage.googleapis.com)... 74.125.135.207, 74.125.195.207, 172.253.117.207, ... Connecting to chromedriver.storage.googleapis.com (chromedriver.storage.googleapis.com)|74.125.135.207|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2023-09-24 13:29:15 ERROR 404: Not Found. 中略 unzip: cannot find or open /tmp/chromedriver_linux64.zip, /tmp/chromedriver_linux64.zip.zip or /tmp/chromedriver_linux64.zip.ZIP. chmod: cannot access '/tmp/chromedriver': No such file or directory mv: cannot stat '/tmp/chromedriver': No such file or directory 中略 CalledProcessError Traceback (most recent call last) 中略 CalledProcessError: Command ' 実行したコマンド ' returned non-zero exit status 1.

マルチポスト

StackOverflowにも同じ質問を投稿してます。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.31%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問