ideviceinstaller報Segmentation fault: 11錯誤解決過程

背景:今天在另一臺電腦上安裝appium,這臺電腦是別人用過的,上面已經裝了不少工具,遇到了ideviceinstaller報錯的問題,搞了幾乎一天,記錄一下解決的過程。ios

因爲ideviceinstaller是appium  1.4  ios自動化的必備工具,因而用brew install ideviceinstaller安裝了ideviceinstaller,惡夢今後開始。git

而後就是用appium跑ios腳本的時候提示ideviceinstaller錯誤,因而單獨用ideviceinstaller命令來檢查,發現ideviceinstaller –l提示Segmentation fault: 11的錯誤,咱們知道Segmentation fault通常是C++內存的錯誤,這裏怎麼會報錯?github

首先想到的辦法是重裝ideviceinstaller,可是,不管先uninstall再install仍是reinstall,錯誤都是依舊。因而百度查找問題的根源,果真,這種冷門的問題度娘十分不給力,徹底不知道我想搜什麼。因而找google,google搜到在github有一個討論,討論的就是這個問題,地址是:app

https://github.com/libimobiledevice/ideviceinstaller/issues/4ide

還一個討論工具

https://github.com/libimobiledevice/ideviceinstaller/issues/15google

看了這兩個討論,有人建議blog

brew uninstall ideviceinstaller內存

brew install --HEAD ideviceinstallerget

可是這個方法對我沒用,依然報一樣的錯誤,這時我幾乎已經絕望了。休息了一下,看了看大跌的股市,靜下心來從新找問題的根源,再次google,再次去看github上的討論。發現有人提到多是Home Brew的問題,個人brew是何時安裝的,完成記不起來了,細想才發現brew是電腦上原來就安好的,由於我用的是舊的imac。因而把原來的brew徹底卸載,還不放心,再把usr/bin下面的brew用rm –f刪除,而後根據官網brew.sh從新安裝brew。安好brew後再brew install ideviceinstaller,終於,問題解決了。

回想起來,爲何花了這麼長時間才找到問題的根本?由於一開始就找錯了方向,由於ideviceinstaller報錯,因此一直在找ideviceinstaller的緣由。根本緣由多是老版本的brew安新版本的ideviceinstaller會出問題,因此升級一下brew或者從新安裝新版本的brew問題就解決了。

相關文章
相關標籤/搜索