LoginSignup
1
1

More than 1 year has passed since last update.

appiumがインストールできなかったので、インストールするまでの道のり。

Posted at

はじめに

appiumがインストールできなかったので、インストールするまでの道のり。

最終更新日

2022年1月13日

環境の情報

OS
Ubuntu20.04

注意

最新の状態を確認して下さい。

公式はこちら

参考

https://github.com/appium/appium
https://github.com/appium/appium/issues/10020
https://docs.npmjs.com/cli/v8/using-npm/config

状況

appiumをインストールしたいだけだったが、インストール出来ないで、困っていた。
インストールしようとしたら、なんかコケてしまうのであった。

~/インストールしたいフォルダ$ npm install -g appium appium-doctor
npm WARN deprecated authorize-ios@1.2.1: Moved into appium
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/appium-doctor
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules/appium-doctor
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/appium-doctor'
npm ERR!  [Error: EACCES: permission denied, access '/usr/lib/node_modules/appium-doctor'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules/appium-doctor'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ユーザー名/.npm/_logs/2022-01-13T02_55_55_212Z-debug.log

パーミッションとか出てくる。
権限だろうか。

〜/ ^ npm install -g appium appium-doctor
npm警告非推奨のauthorize-ios@1.2.1:appiumに移動しました
npm WARN非推奨のdebug@4.1.1:デバッグバージョン> = 3.2.0 <3.2.7 || > = 4 <4.3.1は、Node.js環境で使用すると、重大度の低いReDosリグレッションが発生します。 3.2.7または4.3.1にアップグレードすることをお勧めします。 (https://github.com/visionmedia/debug/issues/797)
npm WARN checkPermissions / usr / lib / node_modules / appium-doctorへの書き込みアクセスがありません
npm WARN checkPermissions / usr / lib / node_modulesへの書き込みアクセスがありません
npm ERR!コードEACCES
npm ERR!システムコールアクセス
npm ERR!パス/ usr / lib / node_modules / appium-doctor
npm ERR! errno -13
npm ERR!エラー:EACCES:権限が拒否されました。アクセス '/ usr / lib / node_modules / appium-doctor'
npm ERR! [エラー:EACCES:権限が拒否されました。アクセス '/ usr / lib / node_modules / appium-doctor'] {
npm ERR! errno:-13、
npm ERR!コード: 'EACCES'、
npm ERR!システムコール: 'アクセス'、
npm ERR!パス: '/ usr / lib / node_modules / appium-doctor'
npm ERR! }
npm ERR!
npm ERR!オペレーティングシステムによって操作が拒否されました。
npm ERR!現在のユーザーとしてこのファイルにアクセスする権限がない可能性があります
npm ERR!
npm ERR!これが権限の問題である可能性があると思われる場合は、
npm ERR!ファイルとそれに含まれるディレクトリの権限、または実行してみてください
npm ERR! root / Administratorとしてコマンドを再度実行します。

npm ERR!この実行の完全なログは、次の場所にあります。
npm ERR! / home /氏名/.npm/_logs/2022-01-13T02_55_55_212Z-debug.log

sudoしても、なんかコケる。

~/インストールしたいフォルダ$ sudo npm install -g appium appium-doctor
npm WARN deprecated authorize-ios@1.2.1: Moved into appium
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
/usr/bin/appium-doctor -> /usr/lib/node_modules/appium-doctor/appium-doctor.js
/usr/bin/appium -> /usr/lib/node_modules/appium/build/lib/main.js

> appium-windows-driver@1.19.1 install /usr/lib/node_modules/appium/node_modules/appium-windows-driver
> node install-npm.js

Not installing WinAppDriver since did not detect a Windows system

> core-js@2.6.12 postinstall /usr/lib/node_modules/appium/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> appium-chromedriver@4.27.3 postinstall /usr/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js

(node:27097) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/2022013-27097-1eog0vs.7jyk'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:27097) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27097) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[11:56:42] Error installing Chromedriver: EACCES: permission denied, mkdir '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver'
[11:56:42] Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver'
[11:56:42] Downloading Chromedriver can be skipped by using the '--chromedriver-skip-install' flag or setting the 'APPIUM_SKIP_CHROMEDRIVER_INSTALL' environment variable.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@4.27.3 postinstall: `node install-npm.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the appium-chromedriver@4.27.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-01-13T02_56_43_112Z-debug.log
~/インストールしたいフォルダ$ sudo npm install -g appium appium-doctor
npm警告非推奨のauthorize-ios@1.2.1:appiumに移動しました
npm WARN非推奨のdebug@4.1.1:デバッグバージョン> = 3.2.0 <3.2.7 || > = 4 <4.3.1は、Node.js環境で使用すると、重大度の低いReDosリグレッションが発生します。 3.2.7または4.3.1にアップグレードすることをお勧めします。 (https://github.com/visionmedia/debug/issues/797)
/ usr / bin / appium-doctor-> /usr/lib/node_modules/appium-doctor/appium-doctor.js
/ usr / bin / appium-> /usr/lib/node_modules/appium/build/lib/main.js

> appium-windows-driver@1.19.1 install / usr / lib / node_modules / appium / node_modules / appium-windows-driver
>ノードインストール-npm.js

Windowsシステムを検出しなかったため、WinAppDriverをインストールしません

> core-js@2.6.12 postinstall / usr / lib / node_modules / appium / node_modules / core-js
> node -e "try {require( './ postinstall')} catch(e){}"

JavaScript標準ライブラリのポリフィルにcore-js(https://github.com/zloirock/core-js)をご利用いただきありがとうございます。

プロジェクトはあなたの助けを必要としています! OpenCollectiveまたはPatreonでのcore-jsのサポートを検討してください。
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock

また、core-js(https://github.com/zloirock)の作者は良い仕事を探しています-)


> appium-chromedriver@4.27.3 postinstall / usr / lib / node_modules / appium / node_modules / appium-chromedriver
>ノードインストール-npm.js

(ノード:27097)UnhandledPromiseRejectionWarning:エラー:EACCES:パーミッションが拒否されました、mkdir '/ usr / lib / node_modules / appium / node_modules / appium-chromedriver / 2022013-27097-1eog0vs.7jyk'
(警告が作成された場所を示すには、 `node --trace-warnings ...`を使用します)
(ノード:27097)UnhandledPromiseRejectionWarning:未処理のプロミス拒否。このエラーは、catchブロックなしで非同期関数の内部をスローするか、.catch()で処理されなかったpromiseを拒否することによって発生しました。未処理のPromise拒否でノードプロセスを終了するには、CLIフラグ `--unhandled-rejections = strict`を使用します(https://nodejs.org/api/cli.html#cli_unhandled_rejections_modeを参照)。 (拒否ID:1)
(ノード:27097)[DEP0018] DeprecationWarning:未処理のpromise拒否は非推奨になりました。将来、処理されないpromise拒否は、ゼロ以外の終了コードでNode.jsプロセスを終了します。
[11:56:42] Chromedriverのインストール中にエラーが発生しました:EACCES:権限が拒否されました、mkdir '/ usr / lib / node_modules / appium / node_modules / appium-chromedriver / chromedriver'
[11:56:42]エラー:EACCES:権限が拒否されました、mkdir '/ usr / lib / node_modules / appium / node_modules / appium-chromedriver / chromedriver'
[11:56:42] Chromedriverのダウンロードは、「-chromedriver-skip-install」フラグを使用するか、「APPIUM_SKIP_CHROMEDRIVER_INSTALL」環境変数を設定することでスキップできます。
npm ERR!コードELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@4.27.3 postinstall: `node install-npm.js`
npm ERR!終了ステータス1
npm ERR!
npm ERR! appium-chromedriver@4.27.3ポストインストールスクリプトで失敗しました。
npm ERR!これはおそらくnpmの問題ではありません。上記の追加のログ出力がある可能性があります。

npm ERR!この実行の完全なログは、次の場所にあります。
npm ERR! /root/.npm/_logs/2022-01-13T02_56_43_112Z-debug.log 

対策

~/インストールしたいフォルダ$ sudo npm install -g appium --unsafe-perm=true --allow-root
/usr/bin/appium -> /usr/lib/node_modules/appium/build/lib/main.js

> appium-windows-driver@1.19.1 install /usr/lib/node_modules/appium/node_modules/appium-windows-driver
> node install-npm.js

Not installing WinAppDriver since did not detect a Windows system

> core-js@2.6.12 postinstall /usr/lib/node_modules/appium/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)


> appium-chromedriver@4.27.3 postinstall /usr/lib/node_modules/appium/node_modules/appium-chromedriver
> node install-npm.js

dbug ChromedriverStorageClient Parsed 554 entries from storage XML
info ChromedriverStorageClient The total count of entries in the mapping: 394
dbug ChromedriverStorageClient Selecting chromedrivers whose versions match to 91.0.4472.101
dbug ChromedriverStorageClient Got 4 items
dbug ChromedriverStorageClient Selecting chromedrivers whose platform matches to linux64
dbug ChromedriverStorageClient Got 1 item
dbug ChromedriverStorageClient Got 1 driver to sync: [
dbug ChromedriverStorageClient   "91.0.4472.101/chromedriver_linux64.zip"
dbug ChromedriverStorageClient ]
dbug ChromedriverStorageClient Retrieving 'https://chromedriver.storage.googleapis.com/91.0.4472.101/chromedriver_linux64.zip' to '/tmp/2022013-36816-bhyn2z.zbhek/0.zip'
dbug Support Traversed 1 directory and 1 file in 2ms
dbug ChromedriverStorageClient Moving the extracted 'chromedriver' to '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v91.0.4472.101'
dbug ChromedriverStorageClient Permissions of the file '/usr/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver/linux/chromedriver_linux64_v91.0.4472.101' have been changed to 755
info ChromedriverStorageClient Successfully synchronized 1 chromedriver
+ appium@1.22.2
added 686 packages from 642 contributors in 10.072s

確認

~/インストールしたいフォルダ$ appium -v
1.22.2

バージョン番号が表示されたので、インストール出来たようです。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1