【Homebrew】之相关命令问题合集及iOS真机调试包

一、Homebrew更换国内镜像源(中科大、阿里、清华)

Homebrew主要有四个部分组成: brew、homebrew-core 、homebrew-bottles、homebrew-cask。

名称说明
brew Homebrew 源代码仓库
homebrew-core Homebrew 核心软件仓库
homebrew-bottles Homebrew 预编译二进制软件包
homebrew-cask MacOS 客户端应用

 

 

 

 

 

 

 查看 brew.git 当前源

cd "$(brew --repo)" && git remote -v

查看 homebrew-core.git 当前源

cd "$(brew --repo homebrew/core)" && git remote -v

如果输出是下面这些,就代表不是本地镜像源,可以换成本地镜像源,这样下载会更快点。

查看 brew.git 当前源输出

origin    https://github.com/Homebrew/brew.git (fetch)
origin    https://github.com/Homebrew/brew.git (push)

查看 homebrew-core.git 当前源输出

origin    https://github.com/Homebrew/homebrew-core.git (fetch)
origin    https://github.com/Homebrew/homebrew-core.git (push)

替换中科大镜像源:

复制代码
# 替换homebrew默认源
cd /usr/local
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git
# 替换homebrew-core默认源
cd /usr/local/Library/Taps/homebrew/homebrew-core
git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-core.git
# 替换homebrew-cask默认源
cd /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask
git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-cask.git
# 替换homebrew bottles默认源
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bashrc
sourch ~/.bashrc
复制代码

其他源参考文章:

更换 homebrew 国内镜像源

Homebrew更换国内镜像源(中科大、阿里、清华)

刘悦的技术博客Mac os:将Homebrew的下载源换成国内镜像增加下载速度(阿里云镜像)

二、homebrew-core、homebrew-cask报错

homebrew-core is a shallow clone.

homebrew-cask is a shallow clone.

 1、解决办法:(推荐)

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

2、或者解决homebrew-core报错,homebrew-cask同上:(次推荐)

cd /usr/local/Homebrew/Library/Taps/homebrew
rm -rf homebrew-core
brew upgrade

参考文章:

Mac homebrew报错Error: homebrew-core is a shallow clone.

那钱有着落吗mac homebrew-cask is a shallow clone

图文教程homebrew-core is a shallow clone

三、Error: Cannot tap homebrew/core: invalid syntax in tap!报错

但是删除homebrew-core之后会一直更新失败,原因是之前homebrew-core没有更换国内源,只能手动下载

git clone https://mirrors.ustc.edu.cn/homebrew-core.git

参考文章:《brew安装失败Error: Invalid formula:

解决办法:

# 进入homebrew
cd /usr/local/Homebrew/Library/Taps/homebrew
# git下载
git clone https://mirrors.ustc.edu.cn/homebrew-core.git
# 更新
brew update

四、安装ideviceinstaller报错

brew install ideviceinstaller

报错:fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': File exists.

参考文章:git 提交出现这个错误fatal: Unable to create ‘project_path/.git/index.lock’: File exists. exists

# 进入Homebrew
cd /usr/local/Homebrew/
# 删除index.lock
rm -f ./.git/index.lock

但是更新时候还是报错:

Error: ideviceinstaller: Failed to download resource "libtasn1"
Download failed: https://ftpmirror.gnu.org/libtasn1/libtasn1-4.18.0.tar.gz

查看下载得知,应该是下载源的问题,因为我之前没有更新国内源,更新操作看【一】:

更新中科大镜像源:

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask" && git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

再安装ideviceinstaller,成功!

brew install ideviceinstaller

参考文章:

金牛肖马Mac如何安装使用libimobiledevice,ideviceinstaller(类似adb )

chen_2987mac真机命令及ideviceinstaller安装

在Mac机上用命令idevice_id -l来查udid和ideviceinstaller -l来查看bundleId出现错误

使用命令行对ios设备截屏

五、IOS命令截图(未解决)

idevicescreenshot test.png

截图报错:Could not start screenshotr service! Remember that you have to mount the Developer disk image on your device if you want to use the screenshotr service.

需要下载对应的真机调试包到xcode中

# 查看手机版本
ideviceinfo -k ProductVersion
# 进入支持版本
cd /Applications/Xcode/Xcode10.0.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# 安装
ideviceimagemounter DeveloperDiskImage.dmg

 参考文章:

BYINCDopenstf支持ios设备和问题解决*****大佬的文章

iOS安全逆向之旅--安全逆向环境搭建和工具使用介绍

llIIIllIllIIiOS15真机调试包(14 - 15.4)*****下载包

但是发现还是报错:Could not connect to screenshotr!

 

 尝试其他办法,待解决

六、安装ifuse

brew install ifuse

报错:Error: ifuse has been disabled because it requires closed-source macFUSE!

 参考文章:【解决】brew无法安装三方库的问题:ifuse has been disabled because it requires closed-source macFUSE

原因:

ifuse等三方库不再开源,FUSE底层基础软件闭源,依赖FUSE的三方库都受到影响,导致Homebrew不支持直接安装这些库了~~

解决方法:

复制代码
brew install macfuse  ##确保已经安装macFUSE
brew formula ifuse  ##获取ifuse的路径 $location_ifuse
vim $location_ifuse ##编辑ifuse的文件
 
 
 
注释以下段落后保存(:wq)
 
#  on_macos do
#    disable! date: "2021-04-08", because: "requires closed-source macFUSE"
#  end
 
 
brew install ifuse ##安装ifuse
复制代码

七、安装gnutls

brew install gnutls

安装报错:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

参考文章:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused的几种解决方式

原因是:ping这个raw.githubusercontent.com地址,ping不上

ping raw.githubusercontent.com

解决方案:

(1)打开网站

https://www.ipaddress.com/
查询一下 raw.githubusercontent.com对应的IP 地址

 

 修改hostst文件

vim /etc/hosts

加上ip地址

 再ping成功了

 但是再次安装又报错了:curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443 

参考文章:curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.gith

直接在hosts最后添加即可

#github
192.30.253.xxx github.com
151.101.113.xxx github.global.ssl.fastly.net

以上两个地址,还是参考之前的网站获取

 

 

附录:

Mac下用终端工具libimobiledevice管理iPhone

ios小袁君iOS自动化【一点经验】

③《libimobiledevice 一些常用指指令

 

posted @   Owen_ET  阅读(833)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
  1. 1 イエスタデイ(翻自 Official髭男dism) 茶泡饭,春茶,kobasolo
  2. 2 模様 (TV size ver.) Ivy to Fraudulent Game
  3. 3 河口恭吾
  4. 4 愛してる 高鈴
  5. 5 一生所爱 卢冠廷,莫文蔚
  6. 6 世间美好与你环环相扣 柏松
  7. 7 理想三旬 陈鸿宇
  8. 8 不浪漫罪名 王杰
  9. 9 樱花树下 张敬轩
  10. 10 因为你在 达闻西乐队,福禄寿FloruitShow
  11. 11 悬溺 葛东琪
理想三旬 - 陈鸿宇
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

作词 : 唐映枫

作曲 : 陈鸿宇

编曲 : 陈鸿宇/马雨阳

混音:马雨阳

雨后有车驶来

驶过暮色苍白

旧铁皮往南开 恋人已不在

收听浓烟下的 诗歌电台

不动情的咳嗽 至少看起来

归途也还可爱

琴弦少了姿态

再不见那夜里 听歌的小孩

时光匆匆独白

将颠沛磨成卡带

已枯卷的情怀 踏碎成年代

就老去吧 孤独别醒来

就老去吧 孤独别醒来

你渴望的离开

你渴望的离开

只是无处停摆

就歌唱吧 眼睛眯起来

而热泪的崩坏

只是没抵达的存在

青春又醉倒在

青春又醉倒在

籍籍无名的怀

靠嬉笑来虚度 聚散得慷慨

辗转却去不到 对的站台

如果漂泊是成长 必经的路牌

你迷醒岁月中

那贫瘠的未来

像遗憾季节里 未结果的爱

弄脏了每一页诗

吻最疼痛的告白

而风声吹到这 已不需要释怀

就老去吧 孤独别醒来

你渴望的离开

你渴望的离开

只是无处停摆

就歌唱吧 眼睛眯起来

而热泪的崩坏

只是没抵达的存在

就甜蜜地忍耐

就甜蜜地忍耐

繁星润湿窗台

光影跳动着像在 困倦里说爱

再无谓的感慨

以为明白

梦倒塌的地方 今已爬满青苔

点击右上角即可分享
微信分享提示