Submitted by gouki on 2022, November 17, 12:52 PM
之前写过一篇Mac蓝牙鼠标卡顿、飘的临时解决方案,但当时这种方法其实现在感觉一般其实还有一个简单粗暴的办法,打开活动监视器,搜索bluetoothd(其实只要搜索blu三个字母就出来了)。然后直接杀掉这个进程。
因为这个是系统服务,你杀完后他会自动重启,这时候晃晃鼠标什么的,就又会自动连上了。
卡顿的问题基本上确实就是:2.4G的wifi冲突,当然还有可能是某些中断导致。但一般重启一下bluetoothd服务就能解决90%以上的问题。
再不济,重启吧
苹果相关 | 评论:0
| 阅读:3238
Submitted by gouki on 2016, February 22, 11:08 AM
mac突然间就没有声音了。。。按照以往的办法,拿出耳机,插拔一下。。。结果 还是没有
最后没办法,从网上找了点资料,说是:
XML/HTML代码
- sudo killall coreaudiod
然后就好了,不过有人说,这样也不一定有效,果然在知乎上有很多大神就说了不少方法,手法不同,各有千秋,我挑个最简单的出来:
XML/HTML代码
- 著作权归作者所有。
- 商业转载请联系作者获得授权,非商业转载请注明出处。
- 作者:周全
- 链接:http://www.zhihu.com/question/21975970/answer/20769174
- 来源:知乎
-
- 应该是系统问题 重启成本还是很高的 可以试着重载声音驱动
- sudo kextunload /System/Library/Extensions/AppleHDA.kext
- sudo kextload /System/Library/Extensions/AppleHDA.kext
其他更多请查看上述的链接,或者打开这个网页:http://www.zhihu.com/question/21975970
苹果相关 | 评论:1
| 阅读:46074
Submitted by gouki on 2023, April 13, 7:53 PM
为什么需要 python2,还不是因为 node_sass 需要用到它。没有它,npm installF 得了无法执行而直接报错。但苹果从 M1开始就不再默认带上 Python2,而是默认3.x(好象是3.9)。
那怎么办呢?
先安装个 pyenv,再用 pyenv 安装2.7
1、brew install pyenv
2、arch -x86_64 pyenv install 2.7.18
3、把路径加入到配置文件:export PATH="$(pyenv root)/shims:${PATH}"
Over。如果是非 M1的话,直接 pyenv install 2.7.18即可
苹果相关 | 评论:0
| 阅读:307
Submitted by gouki on 2022, October 14, 9:49 PM
其实我一直在想,这个功能什么时候会被关掉。
开始:
用cloudflare tunnel的时候,从没想过会在macos上出问题,如果你直接cloudflared service install,不会运行,即使你sudo了也不会,因为这个运行的只是cloudflared,并不带任何参数。
需要在相应的plist下面加上<string>tunnel</string><string>run</string>才OK。
加之前需要先unload,然后再load。否则无效。
其他都与官方一致。
---
如果用sudo了。需要将~/.cloudflared/下的内容copy到/etc/cloudflared下面。如果不放心或者担心没权限,可以修改uuid.json,将路径改为/etc/cloudflared/。其他照旧
记得配合一下valet,因为valet tld之后,子域名的映射会比较方便。
而且valet也支持multi php version。
---EOF
苹果相关 | 评论:0
| 阅读:1078
Submitted by gouki on 2022, October 14, 11:25 AM
远程操作家里的mac mini进行更新的时候,突然报错:
XML/HTML代码
- mini:Homebrew mini$ brew update
- Warning: No available formula with the name "ca-certificates".
- ==> Searching for similarly named formulae...
- Error: No similarly named formulae found.
- ==> Searching for a previously deleted formula (in the last month)...
- Warning: homebrew/core is shallow clone. To get its complete history, run:
- git -C "$(brew --repo homebrew/core)" fetch --unshallow
-
- Error: No previously deleted formula found.
- ==> Searching taps on GitHub...
- Error: No formulae found in taps.
- Error:
- homebrew-core is a shallow clone.
- To `brew update`, first run:
- git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
- This command may take a few minutes to run due to the large size of the repository.
- This restriction has been made on GitHub's request because updating shallow
- clones is an extremely expensive operation due to the tree layout and traffic of
- Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
- automatically to avoid repeatedly performing an expensive unshallow operation in
- CI systems (which should instead be fixed to not use shallow clones). Sorry for
- the inconvenience!
于是执行
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow ,然而执行下来还是:
XML/HTML代码
- error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out
- fatal: the remote end hung up unexpectedly
然后我就用打开git trace进行查看:
XML/HTML代码
- GIT_TRACE=2 git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
- 10:29:28.798061 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/bin/git
- 10:29:28.798668 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/bin
- 10:29:28.799328 git.c:418 trace: built-in: git fetch --unshallow
- 10:29:28.801482 run-command.c:643 trace: run_command: GIT_DIR=.git git-remote-https origin https://mirrors.ustc.edu.cn/homebrew-core.git
- 10:29:28.812513 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git-remote-https
- 10:29:28.813122 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core
- 10:29:28.929816 run-command.c:643 trace: run_command: git fetch-pack --stateless-rpc --stdin --lock-pack --include-tag --thin --depth=2147483647 https://mirrors.ustc.edu.cn/homebrew-core.git/
- 10:29:28.935164 exec-cmd.c:139 trace: resolved executable path from Darwin stack: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core/git
- 10:29:28.935863 exec-cmd.c:236 trace: resolved executable dir: /Applications/Xcode.app/Contents/Developer/usr/libexec/git-core
- 10:29:28.936585 git.c:418 trace: built-in: git fetch-pack --stateless-rpc --stdin --lock-pack --include-tag --thin --depth=2147483647 https://mirrors.ustc.edu.cn/homebrew-core.git/
- error: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out
- fatal: the remote end hung up unexpectedly
这个。。--depth=2147483647,居然这么深?
---
在非正常之前,做了不少操作,比如用官方的uninstall脚本清除了系统,然而也没有什么用。所幸,现在正常了。
苹果相关 | 评论:0
| 阅读:1018