[06:44:08] Error: EACCES: permission denied, mkdir '/root/.nvm/versions/node/v12.21.0/lib/node_modules/appium/node_modules/appium-chromedriver/chromedriver' [06:44:08] 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-03-03T06_44_11_004Z-debug.log [root@22fea2c5fd87 .nvm]# appium bash: appium: command not found [root@22fea2c5fd87 .nvm]# npm install -g appium --chromedriver-skip-install /root/.nvm/versions/node/v12.21.0/bin/appium -> /root/.nvm/versions/node/v12.21.0/lib/node_modules/appium/build/lib/main.js
C:\Users\Shuqing>python Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from appium import webdriver
如果出现如下报错,则说明安装失败
1 2
ImportError: No module named 'appium' ImportError: cannot import name “webdriver”
C:\Users\Shuqing>java -version java version "1.8.0_05" Java(TM) SE Runtime Environment (build 1.8.0_05-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
C:\Users\Shuqing>appium-doctor info AppiumDoctor Appium Doctor v.1.4.3 info AppiumDoctor ### Diagnostic starting ### info AppiumDoctor ✔ The Node.js binary was found at: D:\program files\nodejs\node.exe info AppiumDoctor ✔ Node version is 6.11.3 info AppiumDoctor ✔ ANDROID_HOME is set to: E:\Andriod_sdk info AppiumDoctor ✔ JAVA_HOME is set to: C:\Program Files\Java\jdk1.8.0_05 info AppiumDoctor ✔ adb exists at: E:\Andriod_sdk\platform-tools\adb.exe info AppiumDoctor ✔ android exists at: E:\Andriod_sdk\tools\android.bat info AppiumDoctor ✔ emulator exists at: E:\Andriod_sdk\tools\emulator.exe info AppiumDoctor ✔ Bin directory of %JAVA_HOME% is set info AppiumDoctor ### Diagnostic completed, no fix needed. ### info AppiumDoctor info AppiumDoctor Everything looks good, bye! info AppiumDoctor
如果上面某一项显示为“X”则说明相关环境没有配置好,需要重新安装配置。
踩坑相关
fsevents依赖问题
1 2 3 4
platform unsupported fsevents@1.x Package require os(darwin) not compatible with your platform(win32) [fsevents@1.x] optional install error: Package require os(darwin) not compatible with your platform(win32) [24/29] appium-android-driver@1.x installed at node_modules\_appium-android-driver@1.40.1@appium-android-driver
解决方案: 运行下面的命令
1 2 3 4
npm rebuild node-sass
npm install
uiautomator相关apk不可读
1 2 3
[ADB] Running 'E:\Andriod_sdk\platform-tools\adb.exe -P 5037 -s 7643c658 forward tcp:8200 tcp:6790' [UiAutomator2] Server package at 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.24.0.apk' is not writeable. Will copy it into the temporary location at 'C:\Users\Shuqing\AppData\Local\Temp\20211130-30096-11ux4rt.rldb' as a workaround. Consider making this file writeable manually in order to improve the performance of session startup. [UiAutomator2] Server package at 'C:\Program Files\Appium Server GUI\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk' is not writeable. Will copy it into the temporary location at 'C:\Users\Shuqing\AppData\Local\Temp\20211130-30096-11ux4rt.rldb' as a workaround. Consider making this file writeable manually in order to improve the performance of session startup.
An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of 'C:\Users\Administrator\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.17.4.apk'. Original error: Could not find 'apksigner.jar'