macOS出问题了会让你以为是自己的错误。
比如在老系统上登陆 APPLE ID, 明明是根证书的问题, 它不告诉你证书过期。
只告诉你密码不对。
你会以为是自己老年*呆或者眼睛老花甚至键盘故障, 而不会想到是根证书过期。

安装系统到最后的 “剩余大约一秒钟”
这将是证明爱因斯坦的相对论的一个实例。
同样是一秒钟, WINDOWS 上一般是人类的 0.1~ 1.0 秒钟, macOS 是人类的 10 秒~ 3600 秒 甚至 24 小时。因此, 苹果用户的耐心是世界上最好最完美的。
同一坨 * , 在 WINDOWS 用户眼里它是 *; 在 macOS 用户眼里,它是肥料、金坷垃甚至是文物和文化象征。
ssl cert
https://apple.stackexchange.com/questions/422332/how-do-i-update-my-root-certificates-on-an-older-version-of-mac-os-e-g-el-capi
开发工具下载:
https://developer.apple.com/xcode/resources/
https://developer.apple.com/download/applications/
https://www.macports.org/install.php
https://github.com/macports/macports-base/releases/tag/v2.8.1

花了两个星期折腾二手苹果机和系统。只想快点转回 LINUX / FEDORA 38。

装个 10.X.X 的系统, 竟然不能用新版的 VS CODE。12.X.X , 13.X.X 卡得就像 2000 年的机器跑 WINDOWS 8.换成 FEDORA 38 和 WINDOWS 10 立刻跑得飞快。










俺家境贫寒, 一般到二手店淘二手电脑。
这 5 台苹果电脑, 总共只花了俺 3000 人民币。当然,升级 SSD 额外花了将近 1000 人民币。最近手痒,有点自我膨胀,一口气买了 十多台大小不一的二手苹果电脑。

。。
附录:
麦文学实操笔记: 制作iMAC24 OS X Yosemite安装盘
话说俺 40 多刀从二手店买了个 iMAC24。主要是看它挺沉的, 卖铝都不止 40 刀了。在店里开不了机, 貌似内存条被主人拔了 (她/他可能以为内存条就是硬盘)。
前两个星期, 俺 50 多刀买了个 MAC BOOK PRO A1278. 刚好换下来 8GB 内存。插上去以后, 居然开机了。开机以后俺笑了, 前机主在机器上面安装过一个古怪的 BOOT LOADER 多重启动管理器, 而且是有问题的。OS X Yosemite 也被破坏了。
https://www.rodsbooks.com/refind/installing.html
The rEFInd Boot Manager
尝试安装 UBUNTU 22 和 fedora 38 都失败了。
直接用 FEDORA MEDIA WRITER 烧录 iso 制作的 MAC OS X usb 启动盘都出现
错误:This copy of the Install OS X Yosemite application can’t be verified. It may have been corrupted or tampered with during downloading....
于是, 为了排除 ID10T 错误, 俺一本正经地按照网上的复杂的流程开始了OS X Yosemite USB 安装盘的制作。
制作OS X Yosemite USB 安装盘
如果已经在Mac上的
/Applications/
文件夹里有OS X Yosemite安装程序,可以直接跳到这一步:
从 Mac App Store下载OS X Yosemite,它是免费的。
http://updates-http.cdn-apple.com/2019/cert/061-41343-20191023-02465f92-3ab5-4c92-bfe2-b725447a070d/InstallMacOSX.dmg
Yosemite 10.10
http://updates-http.cdn-apple.com/2019/cert/061-39476-20191023-48f365f4-0015-4c41-9f44-39d3d2aca067/InstallOS.dmg
MAC OS X SIERRA
(直接链接)
当下载完成, 点那个 dmg 文件, 以及 pkg 文件, 当看到 "安装OS X Yosemite " 应用程序启动时,立即退出。记得选择“不要删除”或者 “保留安装文件”。
https://support.apple.com/en-mz/HT201372
Create a bootable installer for macOS
以下操作是在笔记本上进行的
MAC BOOK PRO A1278 :
AB
Last login: Sun Apr 23 18:51:19 on ttys000
WenXues-MacBook-Pro:~ WenXue$
WenXues-MacBook-Pro:~ WenXue$ cd Downloads/1010
WenXues-MacBook-Pro:1010 WenXue$ ls
yoInstallMacOSX.dmg
WenXues-MacBook-Pro:1010 WenXue$ cd ..
WenXues-MacBook-Pro:Downloads WenXue$
WenXues-MacBook-Pro:Downloads WenXue$ cd ..
WenXues-MacBook-Pro:~ WenXue$
WenXues-MacBook-Pro:~ WenXue$ sudo ls
Password:
.CFUserTextEncoding .matplotlib Pictures
.DS_Store .vscode Public
.Trash Desktop Zotero
.bash_history Documents misc
.bash_profile Downloads my_codes
.bash_profile.macports-saved_2023-04-14_at_14:55:10 Library python_code
.bash_sessions Movies snake-game.py
.local Music
WenXues-MacBook-Pro:~ WenXue$
WenXues-MacBook-Pro:~ WenXue$ sudo /Applications/I 【这里是按TAB键自动补全】
Image Capture.app/ Install OS X Yosemite.app/ Install macOS High Sierra.app/
WenXues-MacBook-Pro:~ WenXue$ sudo /Applications/Install\ 【这里是按TAB键自动补全】
Install OS X Yosemite.app/ Install macOS High Sierra.app/
WenXues-MacBook-Pro:~ WenXue$ sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/c
ca.lproj/ cancel.tiff cancelFocusPressed.tiff center.png cs.lproj/
callout_top.png cancelFocus.tiff cancelPressed.tiff createinstallmedia
WenXues-MacBook-Pro:~ WenXue$ sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled/ --applicationpath /Applications/Install\ OS\ X\ Yosemite.app/ --nointeraction
Erasing Disk: 0%... 10%... 20%... 30%...100%...
Copying installer files to disk...
Copy complete.
Making disk bootable...
Copying boot files...
Copy complete.
Done.
WenXues-MacBook-Pro:~ WenXue$
最关键的一句就是:
sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia
--volume /Volumes/Untitled/ --applicationpath /Applications/Install\ OS\ X\ Yosemite.app/
--nointeraction
see ALSO:
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia
--volume /Volumes/YOURUSBDRIVE --nointeraction
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/YOURUSBDRIVE --nointeraction

error: This copy of the Install OS X Yosemite application can’t be verified. It may have been corrupted or tampered with during downloading
现在,为 Mac 制作了一个 OS X Yosemite 的可启动USB。当打开 Mac 电源,同时按下键盘 Alt,可以看到图标,开始逐步安装 Yosemite。可是,继续进行,
收到了错误提示:
“ 这个安装OS X Yosemite 应用程序的副本不能被验证。它可能在下载过程中被损坏或篡改了 ”。
(可能的)原因:旧版 macOS 证书已经过期
(可能的)解决方法:断开互联网安装,修改系统时间
OS X Yosemite Intel 发布年份 2014 10.10.5 最新版本
2016年2月14日苹果又更新了一次开发者签名,导致很多之前的验证无法通过。理论上修改为2015年-2016年2月14日之前, e.g. 20151220 都可以
** 备注: 尽管您手动把无线网关闭, 安装程序会自行联网和苹果对答案。
俺的对策就是在防火墙里面把 imac24 给禁止了, 同时把网线拔了。
安装过程因此得以进行。

(如果还是出问题)最终杀招, 用命令行:
如果安装介质的安全有保证,可使用命令行绕过, 强制安装。
适用于通过可启动USB盘执行的安装:
打开终端输入:
installer -pkg /volumes/Mac\ OS\ X\ Install\ DVD/Packages/OSInstall.mpkg
-target /Volumes/"盘符名称" 其中盘符名称是你自己选择的的磁盘分区的“名称”。
等待安装完成。
**备注:没有任何进度提示
---------------------------------------------------------------------
ref:
https://gist.gitXXXhub.com/windyinsc/7ff5f3b37fe3b388d8f15f4d042f3eae
https://www.jamf.com/blog/reinstall-a-clean-macos-with-one-button/
https://cyberark-customers.force.com/s/article/How-to-upgrade-and-updatemacos
https://grahamrpugh.com/2018/03/26/reinstall-macos-from-system-volume.html
https://eclecticlight.co/2021/06/28/making-a-good-recovery-installing-a-different-macos-in-recovery/
https://hcsonline.com/images/PDFs/Upgrade_Big_Sur_Jamf.pdf
https://www.reddit.com/r/macsysadmin/comments/x1roc5/1251_upgrade/?onetap_auto=true
https://doc.sophos.com/central/partner/help/en-us/Help/Deployment/MacCommandLine/index.html
https://apple.stackexchange.com/questions/419564/install-macos-big-sur-using-terminal
macOS High Sierra to install the OS via Terminal:
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/startosinstall -applicationpath /Applications/Install\ macOS\ Big\ Sur.app
#/Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/startosinstall
-applicationpath /Applications/Install\ macOS\ Big\ Sur.app
/Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/startosinstall --usage
--------------------------------------------------------------------
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia
--volume /Volumes/YOURUSBDRIVE --nointeraction
'/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall'
--eraseinstall --agreetolicense --forcequitapps --newvolumename 'Mac'
--user wenxue --stdinpass
<<< "MyEasyPassword12345$"
/Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled
------------------------------------------------
https://stackXXXoverflow.com/questions/73513566/how-can-i-silently-upgrade-macos-from-intel-rosetta-process
sudo arch -arm64 /Applications/Install\ macOS
Monterey.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --passprompt
Open Terminal and type the following command:
Download latest installer:
sudo softwareupdate --fetch-full-installer
When the installer is downloaded you proceed with the following command, depending on which installer was downloaded:
Install Monteray:
/Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall --eraseinstall --agreetolicense --forcequitapps --newvolumename 'Macintosh HD' --passprompt
Install Big Sur:
/Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/startosinstall --eraseinstall --agreetolicense --forcequitapps --newvolumename 'Macintosh HD' --passprompt
Install Catalina:
/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall --eraseinstall --agreetolicense --forcequitapps --newvolumename 'Macintosh HD'

-bash-3.2#/Volumes/Image\ Volumes/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall
--volume /Volumes/Mac --nointeraction --agreetolicense --forcequitapps
Preparing: xx.x%
参考:
https://discussions.apple.com/thread/253345368
https://apple.stackexchange.com/questions/246452/this-copy-of-the-install-os-x-yosemite-application-can-t-be-verified-it-may-hav
https://osxdaily.com/2017/05/18/access-terminal-recovery-mode-mac/
https://www.howtogeek.com/682770/how-to-open-the-terminal-on-a-mac/
https://osxdaily.com/2014/10/16/make-os-x-yosemite-boot-install-drive/
https://recoverit.wondershare.com/mac-tips/iso-to-usb-on-mac.html#:~:text=Method%205%3A%20Copy%20ISO%20to%20USB%20Mac%20with%20UNetbootin,-UNetbootin%20is%20a&text=Step%201%3A%20In%20the%20ISO,wait%20until%20the%20process%20completes.
https://www.macworld.com/article/223647/how-to-make-a-bootable-os-x-10-10-yosemite-install-drive.html
https://www.lifewire.com/use-disk-utility-bootable-os-x-yosemite-installer-2259935
附录:
同样适用于 MAC OS X El Capitan 的命令行: 对付 error“这个安装 OS X El Capitan 应用程序的副本不能被验证。它可能在下载过程中被损坏或篡改了”
https://eshop.macsales.com/guides/Mac_OS_X_Compatibility
macOS Compatibility for Mac Laptops

如果安装介质的安全有保证,可使用命令行绕过, 强制安装。适用于通过可启动USB盘执行的安装:
打开终端输入:
installer -pkg /volumes/Mac\ OS\ X\ Install\ DVD/Packages/OSInstall.mpkg
-target /Volumes/"盘符名称" 其中盘符名称是你自己选择的的磁盘分区的“名称”。
等待安装完成。
**备注:没有任何进度提示
附录:
diskutil 对磁盘进行分区
对一个磁盘进行分区
=================
使用
diskutil partitionDisk /dev/disk2 GPT JHFS+ New 0b
该命令的前三部分是不言自明的,diskutil命令,
然后是选项partitionDisk和磁盘的标识符/dev/disk(n)。
JHFS+作为文件系统,然后是给新创建的卷的标签。
分区方案
GPT是分区方案的一个选项。可以使用三种:
GPT: GUID 分区表
APM: 苹果分区图
MBR:主引导记录
除非打算用硬盘启动基于PowerPC的Mac或Windows PC,否则没有理由选择GPT以外的东西。
Intel Mac只能从GUID分区启动。
分区大小
在命令的最后是参数0b。
这代表要创建的分区的大小。你可以指定任何你想要的大小,直到可用空间的最大尺寸,
使用b(字节)、m(兆字节)、g(千兆字节)等等。
指定0b告诉命令只使用所有可用的自由空间。
因此,运行的命令将重新分区一个被识别为disk2的硬盘,
其GUID分区表包含一个名为New的卷,横跨整个磁盘。
多重分区
=============
使用类似的命令,对一个有多个分区的硬盘进行分区,并将它们格式化为可用的卷。
diskutil partitionDisk /dev/disk2 GPT JHFS+ 第一个10g JHFS+ 第二个10g JHFS+ 第三个10g JHFS+ 第四个10g JHFS+ 第五个0b
对于想添加的每个额外分区,惯例如下:
Volume1Format Volume1Name Volume1Size Volume2Format Volume2Name Volume2Size Volume3Format Volume3Name Volume3Size...
如果所有卷的总大小小于要分区的硬盘上的空间,剩余的空间将被作为自由空间留下。
如果试图在GUI磁盘工具中执行同样的任务,首先需要从下拉菜单中指定分区的数量。
然后,选择每个分区并为其命名,同时确保指定所需的大小。
GUI磁盘工具的一个限制是,最多只能给16个分区的磁盘分区。
然而,命令行则没有这种限制,可以根据需要创建任意多的分区。
分割分区
===================
磁盘分区可以用splitPartition分割成多个更小的分区,其命令与分割磁盘类似。
该选项要求在使用前面提到的使用惯例创建分区之前使用分区的磁盘标识符:
diskutil splitPartition /dev/disk2s6 JHFS+ Test 10GB JHFS+ Test2 0b
这个命令将把位于/dev/disk2s6的分区分割成两个更小的分区,分别标为Test和Test2。
合并分区
======================
要将两个或多个分区合并在一起,可以使用mergePartitions选项。
想合并的分区必须根据每个分区的磁盘标识符按顺序排列。
diskutil mergePartitions JHFS+ NewName { first disk identifier in range} {last disk identifier in range}
例如
diskutil mergePartitions JHFS+ NewName disk2s4 disk2s6
第一个磁盘标识符选择了想把其他分区合并到的分区,第二个标识符则指定了范围。
只有第一个磁盘分区上的数据不会被清除,其他分区将被清除并合并到它里面。
在指定的第一个分区不能扩展的情况下,仍然必须指定一个文件系统和卷名。
在这种情况下,命令会提示是否愿意擦除该范围内的所有分区并创建一个新的分区。
总结
通过命令行管理分区并不像想象的那样令人生畏,
它可以比使用GUI磁盘工具更容易做到。
REF:
https://ss64.com/osx/diskutil.html
https://apple.stackexchange.com/questions/63130/create-new-partition-in-unallocated-space-with-diskutil
https://www.theinstructional.com/guides/disk-management-from-the-command-line-part-2
https://www.theinstructional.com/guides/disk-management-from-the-command-line-part-3
https://www.theinstructional.com/guides/disk-management-from-the-command-line-part-1
附录:
卡在 "您的Mac需要进行固件更新 "上了?
全部错误: "您的Mac需要一个固件更新才能安装到此卷。请选择一个Mac OS Extended(Journaled)卷来代替。"
当macOS确定当前的固件不完全支持APFS时,就会出现这个错误。
为了解决这个问题,在安装OpenCore时,前往 "补丁程序设置",并启用 "适度SMBIOS补丁 "或更高版本。这将确保报告的固件显示支持完整的APFS功能。
Stuck on "Your Mac needs a firmware update"
Full error: "Your Mac needs a firmware update in order to install to this Volume. Please select a Mac OS Extended (Journaled) volume instead."

MAC OS X Yosemite / El Capitan / Sierra / High Sierra 安装 python matplotlib 的磨难:解决 freetds 的安装
安装 python matplotlib,
首先, 要解决 freetds 的安装。
https://www.macports.org/install.php
https://github.com/macports/macports-base/releases/tag/v2.8.1
$ sudo port install freetds
Password:
---> Computing dependencies for freetds
The following dependencies will be installed:
curl-ca-bundle
gettext-runtime
gmp
gnutls
icu
kerberos5
legacy-support
libcomerr
libedit
libffi
libiconv
libidn2
libtasn1
libunistring
libxml2
libxslt
lmdb
ncurses
nettle
openssl
openssl3
p11-kit
readline
xz
zlib
Continue? [Y/n]: ---> Fetching archive for libiconv
---> Attempting to fetch libiconv-1.17_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/libiconv
---> Attempting to fetch libiconv-1.17_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libiconv
---> Installing libiconv @1.17_0
---> Activating libiconv @1.17_0
---> Cleaning libiconv
---> Fetching archive for gettext-runtime
---> Attempting to fetch gettext-runtime-0.21.1_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/gettext-runtime
---> Attempting to fetch gettext-runtime-0.21.1_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/gettext-runtime
---> Installing gettext-runtime @0.21.1_0
---> Activating gettext-runtime @0.21.1_0
---> Cleaning gettext-runtime
---> Fetching archive for gmp
---> Attempting to fetch gmp-6.2.1_1.darwin_15.x86_64.tbz2 from http://packages.macports.org/gmp
---> Attempting to fetch gmp-6.2.1_1.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/gmp
---> Installing gmp @6.2.1_1
---> Activating gmp @6.2.1_1
---> Cleaning gmp
---> Fetching archive for legacy-support
---> Attempting to fetch legacy-support-1.0.9_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/legacy-support
---> Attempting to fetch legacy-support-1.0.9_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/legacy-support
---> Installing legacy-support @1.0.9_0
---> Activating legacy-support @1.0.9_0
---> Cleaning legacy-support
---> Fetching archive for libunistring
---> Attempting to fetch libunistring-1.1_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/libunistring
---> Attempting to fetch libunistring-1.1_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libunistring
---> Installing libunistring @1.1_0
---> Activating libunistring @1.1_0
---> Cleaning libunistring
---> Fetching archive for libidn2
---> Attempting to fetch libidn2-2.3.4_1.darwin_15.x86_64.tbz2 from http://packages.macports.org/libidn2
---> Attempting to fetch libidn2-2.3.4_1.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libidn2
---> Installing libidn2 @2.3.4_1
---> Activating libidn2 @2.3.4_1
---> Cleaning libidn2
---> Fetching archive for libtasn1
---> Attempting to fetch libtasn1-4.19.0_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/libtasn1
---> Attempting to fetch libtasn1-4.19.0_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libtasn1
---> Installing libtasn1 @4.19.0_0
---> Activating libtasn1 @4.19.0_0
---> Cleaning libtasn1
---> Fetching archive for nettle
---> Attempting to fetch nettle-3.8.1_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/nettle
---> Attempting to fetch nettle-3.8.1_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/nettle
---> Installing nettle @3.8.1_0
---> Activating nettle @3.8.1_0
---> Cleaning nettle
---> Fetching archive for curl-ca-bundle
---> Attempting to fetch curl-ca-bundle-8.0.1_0.any_any.noarch.tbz2 from http://packages.macports.org/curl-ca-bundle
---> Attempting to fetch curl-ca-bundle-8.0.1_0.any_any.noarch.tbz2.rmd160 from http://packages.macports.org/curl-ca-bundle
---> Installing curl-ca-bundle @8.0.1_0
---> Activating curl-ca-bundle @8.0.1_0
---> Cleaning curl-ca-bundle
---> Fetching archive for libffi
---> Attempting to fetch libffi-3.4.4_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/libffi
---> Attempting to fetch libffi-3.4.4_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libffi
---> Installing libffi @3.4.4_0
---> Activating libffi @3.4.4_0
---> Cleaning libffi
---> Fetching archive for icu
---> Attempting to fetch icu-72.1_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/icu
---> Attempting to fetch icu-72.1_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/icu
---> Installing icu @72.1_0
---> Activating icu @72.1_0
---> Cleaning icu
---> Fetching archive for xz
---> Attempting to fetch xz-5.4.2_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/xz
---> Attempting to fetch xz-5.4.2_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/xz
---> Installing xz @5.4.2_0
---> Activating xz @5.4.2_0
---> Cleaning xz
---> Fetching archive for zlib
---> Attempting to fetch zlib-1.2.13_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/zlib
---> Attempting to fetch zlib-1.2.13_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/zlib
---> Installing zlib @1.2.13_0
---> Activating zlib @1.2.13_0
---> Cleaning zlib
---> Fetching archive for libxml2
---> Attempting to fetch libxml2-2.10.4_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/libxml2
---> Attempting to fetch libxml2-2.10.4_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libxml2
---> Installing libxml2 @2.10.4_0
---> Activating libxml2 @2.10.4_0
---> Cleaning libxml2
---> Fetching archive for libxslt
---> Attempting to fetch libxslt-1.1.37_1.darwin_15.x86_64.tbz2 from http://packages.macports.org/libxslt
---> Attempting to fetch libxslt-1.1.37_1.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libxslt
---> Installing libxslt @1.1.37_1
---> Activating libxslt @1.1.37_1
---> Cleaning libxslt
---> Fetching archive for p11-kit
---> Attempting to fetch p11-kit-0.24.1_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/p11-kit
---> Attempting to fetch p11-kit-0.24.1_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/p11-kit
---> Installing p11-kit @0.24.1_0
---> Activating p11-kit @0.24.1_0
---> Cleaning p11-kit
---> Fetching archive for gnutls
---> Attempting to fetch gnutls-3.7.9_2.darwin_15.x86_64.tbz2 from http://packages.macports.org/gnutls
---> Attempting to fetch gnutls-3.7.9_2.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/gnutls
---> Installing gnutls @3.7.9_2
---> Activating gnutls @3.7.9_2
---> Cleaning gnutls
---> Fetching archive for libcomerr
---> Attempting to fetch libcomerr-1.47.0_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/libcomerr
---> Attempting to fetch libcomerr-1.47.0_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libcomerr
---> Installing libcomerr @1.47.0_0
---> Activating libcomerr @1.47.0_0
---> Cleaning libcomerr
---> Fetching archive for ncurses
---> Attempting to fetch ncurses-6.4_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/ncurses
---> Attempting to fetch ncurses-6.4_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/ncurses
---> Installing ncurses @6.4_0
---> Activating ncurses @6.4_0
---> Cleaning ncurses
---> Fetching archive for libedit
---> Attempting to fetch libedit-20221030-3.1_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/libedit
---> Attempting to fetch libedit-20221030-3.1_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/libedit
---> Installing libedit @20221030-3.1_0
---> Activating libedit @20221030-3.1_0
---> Cleaning libedit
---> Fetching archive for lmdb
---> Attempting to fetch lmdb-0.9.29_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/lmdb
---> Attempting to fetch lmdb-0.9.29_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/lmdb
---> Installing lmdb @0.9.29_0
---> Activating lmdb @0.9.29_0
---> Cleaning lmdb
---> Fetching archive for openssl3
---> Attempting to fetch openssl3-3.1.0_3.darwin_15.x86_64.tbz2 from http://packages.macports.org/openssl3
---> Attempting to fetch openssl3-3.1.0_3.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/openssl3
---> Installing openssl3 @3.1.0_3
---> Activating openssl3 @3.1.0_3
---> Cleaning openssl3
---> Fetching archive for openssl
---> Attempting to fetch openssl-3_10.darwin_15.x86_64.tbz2 from http://packages.macports.org/openssl
---> Attempting to fetch openssl-3_10.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/openssl
---> Installing openssl @3_10
---> Activating openssl @3_10
---> Cleaning openssl
---> Fetching archive for kerberos5
---> Attempting to fetch kerberos5-1.20.1_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/kerberos5
---> Attempting to fetch kerberos5-1.20.1_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/kerberos5
---> Installing kerberos5 @1.20.1_0
---> Activating kerberos5 @1.20.1_0
---> Cleaning kerberos5
---> Fetching archive for readline
---> Attempting to fetch readline-8.2.001_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/readline
---> Attempting to fetch readline-8.2.001_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/readline
---> Installing readline @8.2.001_0
---> Activating readline @8.2.001_0
---> Cleaning readline
---> Fetching archive for freetds
---> Attempting to fetch freetds-1.3.18_0.darwin_15.x86_64.tbz2 from http://packages.macports.org/freetds
---> Attempting to fetch freetds-1.3.18_0.darwin_15.x86_64.tbz2.rmd160 from http://packages.macports.org/freetds
---> Installing freetds @1.3.18_0
---> Activating freetds @1.3.18_0
Configuration file freetds.conf does not exist and has been created using
/opt/local/etc/freetds/freetds.conf.sample
Configuration file locales.conf does not exist and has been created using
/opt/local/etc/freetds/locales.conf.sample
Configuration file pool.conf does not exist and has been created using
/opt/local/etc/freetds/pool.conf.sample
---> Cleaning freetds
---> Updating database of binaries
---> Scanning binaries for linking errors
---> No broken files found.
---> No broken ports found.
---> Some of the ports you installed have notes:
legacy-support has the following notes:
To help make sure your system continues to be well represented by MacPorts, especially if your system is not one of the latest macOS releases, please consider installing mpstats. It
will periodically send an anonymous synopsis of your OS settings and installed ports. The information provided by this is useful to help determine how resources are allocated.
You can install mpstats like this: sudo port install mpstats
matplotlib装不了新版旧版也行。
pip install matplotlib==3.2.1
$ pip install matplotlib==3.5
Requirement already satisfied: matplotlib==3.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (3.5.0)
Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (4.39.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (1.4.4)
Requirement already satisfied: numpy>=1.17 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (1.24.3)
Requirement already satisfied: packaging>=20.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (23.1)
Requirement already satisfied: pillow>=6.2.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (9.5.0)
Requirement already satisfied: pyparsing>=2.2.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (2.8.2)
Requirement already satisfied: setuptools-scm>=4 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (7.1.0)
Requirement already satisfied: six>=1.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib==3.5) (1.16.0)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5) (49.2.1)
Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5) (4.5.0)
Requirement already satisfied: tomli>=1.0.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5) (2.0.1)
别折腾了。
$ pip3 install matplotlib==3.5
Requirement already satisfied: matplotlib==3.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (3.5.0)
Requirement already satisfied: cycler>=0.10 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (4.39.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (1.4.4)
Requirement already satisfied: numpy>=1.17 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (1.24.3)
Requirement already satisfied: packaging>=20.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (23.1)
Requirement already satisfied: pillow>=6.2.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (9.5.0)
Requirement already satisfied: pyparsing>=2.2.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (3.0.9)
Requirement already satisfied: python-dateutil>=2.7 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (2.8.2)
Requirement already satisfied: setuptools-scm>=4 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from matplotlib==3.5) (7.1.0)
Requirement already satisfied: six>=1.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib==3.5) (1.16.0)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5) (49.2.1)
Requirement already satisfied: typing-extensions in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5) (4.5.0)
Requirement already satisfied: tomli>=1.0.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from setuptools-scm>=4->matplotlib==3.5) (2.0.1)
$ pip3 install numba==0.55
Collecting numba==0.55
Downloading numba-0.55.0.tar.gz (2.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 MB 5.0 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Collecting llvmlite<0.39,>=0.38.0rc1 (from numba==0.55)
Downloading llvmlite-0.38.1-cp38-cp38-macosx_10_9_x86_64.whl (25.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 25.5/25.5 MB 13.2 MB/s eta 0:00:00
Collecting numpy<1.22,>=1.18 (from numba==0.55)
Downloading numpy-1.21.6-cp38-cp38-macosx_10_9_x86_64.whl (16.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.9/16.9 MB 14.2 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from numba==0.55) (49.2.1)
Building wheels for collected packages: numba
Building wheel for numba (setup.py) ... done
Created wheel for numba: filename=numba-0.55.0-cp38-cp38-macosx_10_11_x86_64.whl size=2311289 sha256=a508951a30d03cfec8d6ee7e0e6be07ffb19e160423a90ee72648d14dc404284
Successfully built numba
Installing collected packages: numpy, llvmlite, numba
Attempting uninstall: numpy
Found existing installation: numpy 1.24.3
Uninstalling numpy-1.24.3:
Successfully uninstalled numpy-1.24.3
Successfully installed llvmlite-0.38.1 numba-0.55.0 numpy-1.21.6
$ pip3 install simpleaudio
Requirement already satisfied:
simpleaudio in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (1.0.4)

附录:
关于基于Intel的Mac电脑的EFI和SMC固件更新
About EFI and SMC firmware updates for Intel-based Mac computers
This article lists firmware updates available as standalone installers for Intel-based Mac computers.
https://support.apple.com/en-us/HT201518
关于基于Intel的Mac电脑的EFI和SMC固件更新:本文列出了可作为独立安装程序的固件更新,适用于基于Intel的Mac电脑。这篇文章已经被存档,苹果不再更新。
当你更新或升级OS X时,大多数固件更新会自动安装。有些固件更新也可以下载,你可以手动安装。如果您的Mac需要固件更新,但没有自动安装,请检查下面是否列出了手动更新程序。
如果你没有看到本文中列出的固件版本,这意味着要么固件更新只能以自动更新的方式提供,要么不需要固件更新。
如何检查你的固件版本
使用这些步骤来检查您的Mac的EFI Boot ROM和SMC固件版本。
打开系统信息。
选择硬件部分,查看型号标识符、Boot ROM版本和SMC版本号。
如果你在 "系统信息 "中看到的固件版本比为你的Mac列出的版本要新,你就不需要应用为该型号列出的更新。如果你试图使用不是为你的Mac设计的手动更新程序,或者不需要,安装程序会提醒你,软件不会被安装。

可玩性比较强的 python 贪吃蛇
适合上班的时候摸鱼。
授权: WTFPL
from tkinter import *
import random,time
class CatQ(Tk):
def __init__(cat_q,*arge,**kwargs):
Tk.__init__(cat_q,*arge,**kwargs)
cat_q.initialSetup()
def initialSetup(cat_q):
cat_q.base=Canvas(cat_q,width=900,height=900)
cat_q.base.pack(padx=1,pady=1)
cat_q.queue=cat_q.base.create_rectangle(1,1,11,11,fill="lime")
cat_q.score=0
cat_q.scoreText=Label(cat_q,text="Berry:{}".format(cat_q.score),font=('arial',20,'normal'))
cat_q.scoreText.pack(anchor='center')
cat_q.length=3
cat_q.target=None
cat_q.sub_alive=1
cat_q.x=10
cat_q.y=0
cat_q.tail_xy=[(0,0)]
cat_q.bind('<Any-KeyPress>',cat_q.keysCapt)
return
def subject_pos_xy(cat_q):
cat_q.base.move(cat_q.queue,cat_q.x,cat_q.y)
i,j,ii,jj=cat_q.base.coords(cat_q.queue)
if i<=0 or j<=0 or ii>=900 or jj>=900:
cat_q.x=0
cat_q.y=0
## END Game
cat_q.base.create_text(567,567,text="Good job! Try Again!",font=('roman',36,'italic'),fill='black')
cat_q.sub_alive=0
return
def sub_next(cat_q):
stepping = 10
i,j,ii,jj=cat_q.base.coords(cat_q.queue)
ii=(ii-((ii-i)/2))
jj=(jj-((jj-j)/2))
cat_q.tail_xy.append((ii,jj))
cat_q.base.delete('subqbody')
if len(cat_q.tail_xy)>=cat_q.length:
cat_q.tail_xy=cat_q.tail_xy[-cat_q.length:]
cat_q.base.create_line(tuple(cat_q.tail_xy), tag='subqbody', width=stepping, fill="green")
## if len(cat_q.tail_xy)>=10:
## tempo = tempo - 0.2*tempo
return
def bait(cat_q):
stepping = 10
if cat_q.target==None:
a=random.randint(20,890)
b=random.randint(20,890)
cat_q.target=cat_q.base.create_oval(a,b,a+stepping,b+stepping,fill='pink',tag='bait')
if cat_q.target:
i,j,ii,jj=cat_q.base.coords(cat_q.target)
if len(cat_q.base.find_overlapping(i,j,ii,jj))!=1:
cat_q.base.delete("bait")
cat_q.target=None
cat_q.scoreUpd()
cat_q.length+=1
return
def scoreUpd(cat_q):
cat_q.score+=1
cat_q.scoreText['text']="Berry : {}".format(cat_q.score)
return
def keysCapt(cat_q,event=None):
stepping = 10
pressedkey=event.keysym
if pressedkey=='Left':
cat_q.x=-stepping
cat_q.y=0
elif pressedkey=='Up':
cat_q.x=0
cat_q.y=-stepping
elif pressedkey=='Right':
cat_q.x=stepping
cat_q.y=0
elif pressedkey=='Down':
cat_q.x=0
cat_q.y=stepping
else:
pass
return
def subvalid(cat_q):
if(cat_q.sub_alive==0):
return
cat_q.subject_pos_xy()
cat_q.sub_next()
cat_q.bait()
return
catobj=CatQ(className="The Very Hungry Caterpillar Game")
tempo = 0.1
while True:
catobj.update()
catobj.update_idletasks()
catobj.subvalid()
time.sleep(tempo)
..
开发工具下载:
https://developer.apple.com/xcode/resources/
https://developer.apple.com/download/applications/
python 跨平台多谐波音调发生器可自定义频率幅度和时间带 FFT 及波形显示
授权:WTFPL

## LICENSE: WTFPL
import matplotlib.pyplot as plt
import scipy.fftpack
import numpy as np
import simpleaudio as sa
## %matplotlib inline
lf_sigFreq = 1000.0 # typical 440 Hz
lf_sigAmp = 0.99 # 0 dB
li_fsam = 44100 # 44100 samples per sec
li_durSec = 2 # Duration of li_durSec
# create a List or Array of li_durSec*sample_rate elements, from 0 to li_durSec
li_N = li_durSec * li_fsam
Lfa_el = np.linspace(0, li_durSec, li_N, False)
t_scope = np.linspace (0, 2/lf_sigFreq, 2*int(li_fsam/lf_sigFreq), False)
# Cal the element value
lf_toneV = np.sin(lf_sigFreq * Lfa_el * 2 * np.pi)*0.99 + (np.sin(3 * lf_sigFreq * Lfa_el * 2 * np.pi) )/3 + (np.sin(5 * lf_sigFreq * Lfa_el * 2 * np.pi) )/5 + (np.sin(7 * lf_sigFreq * Lfa_el * 2 * np.pi) )/7 + (np.sin(9 * lf_sigFreq * Lfa_el * 2 * np.pi) )/9 + (np.sin(11 * lf_sigFreq * Lfa_el * 2 * np.pi) )/11 + (np.sin(13 * lf_sigFreq * Lfa_el * 2 * np.pi) )/13 + (np.sin(15 * lf_sigFreq * Lfa_el * 2 * np.pi) )/15 + (np.sin(17 * lf_sigFreq * Lfa_el * 2 * np.pi) )/17
# limit amplitude in 16-bit dynamic range 2^15-1
list_el_buff = lf_sigAmp * lf_toneV *32767/ np.max(np.abs(lf_toneV))
yf = scipy.fftpack.fft(list_el_buff/32767)
# Convert to 16-bit WAVE data format
list_el_buff = list_el_buff.astype(np.int16)
# Play back
play_obj = sa.play_buffer(list_el_buff, 1, 2, li_fsam)
#
# https://stackoverflow.com/questions/34162443/why-do-many-examples-use-fig-ax-plt-subplots-in-matplotlib-pyplot-python
#
xf = np.linspace(0.0, li_fsam/2, li_N//2)
fig, ax = plt.subplots()
## nexttile
ax.plot(xf, 2.0/li_N * np.abs(yf[:li_N//2]))
plt.xlabel('Frequency [Hz]');
plt.ylabel('Amplitude [Peak]')
plt.grid()
# plt.grid()
# plt.show()
## title('Plot 1')
# nexttile
fig, ax = plt.subplots()
##ax.plot( Lfa_el, lf_toneV)
ax.plot( t_scope, lf_toneV[: (t_scope.size )])
#plt.xlabel('Time');
#plt.ylabel('Amplitude')
# title('Plot 2')
plt.grid()
plt.show()
# Wait until done and exit
play_obj.wait_done()

。。