手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表分类:苹果相关

Q: Problems upgrading to macOS Mojave on MacBook Pro 2018

 有人说重置SMC可以解决这个问题,然而我没有试。最后看LOG,居然一堆连网错误,难道要校验checksum?

再到苹果官网上看到这个:
https://discussions.apple.com/message/33927150#33927150
  1. Hi,  
  2.   
  3. Had the same problem, but for me it worked by  
  4.   
  5. removing all DNS search domains  
  6. untick the automatic proxy configuration  
  7.    
  8.   
  9. for the Wifi adapter.  
  10.   
  11. good luck.  
果然尝试。果然有效(最终发现还是有问题,终于。。重置NVRAM,安装完成)
 
网址:https://appletoolbox.com/2017/12/macos-could-not-be-installed-how-to-fix/
  1. 节选  
  2. Next, let’s try out the basic NVRAM reset (or PRAM for older Macs) on your computer.  
  3. Follow these steps if you are not sure about how to do the NVRAM reset  
  4. Shut down your Mac  
  5. Turn it on and immediately press and hold these four keys together: Option, Command, P, and R macOS Could Not Be Installed, How-To Fix  
  6. Release the keys after about 20 seconds, during which your Mac might appear to restart  
  7. Open System Preferences and check (and adjust, if necessary) any settings that reset, like volume, display resolution, startup disk selection, or time zone  
  8. 说白了,就是启动的时候 cmd+option+P+R,等20秒。放开,再重启
 
 一切都清静 了。只是感觉这一版,没什么变动的

invalid command code ., despite escaping periods, using sed

 linux上面,如果替换文件中的内容,其实还是比较方便的。比如:sed -i 's/xxx/yyy/g' xxx.txt

然而同样的命令,如果放到mac下面,就会报:sed: 1: "xxx.txt": invalid command code o
到stackoverflow.com就会发现已经有人回复了:https://stackoverflow.com/questions/19456518/invalid-command-code-despite-escaping-periods-using-sed
XML/HTML代码
  1. If you are on a OS X, this probably has nothing to do with the sed command. On the OSX version of sed, the -i option expects an extension argument so your command is actually parsed as the extension argument and the file path is interpreted as the command code.  
  2.   
  3. Try adding the -e argument explicitly and giving '' as argument to -i:  
  4.   
  5. find ./ -type f -exec sed -i '' -e "s/192.168.20.1/new.domain.com/" {} \;  
  6. See this.  
所以上面的代码就改为:sed -i '' -e 's/xxx/yyy/g' xxx.txt ,搞定
 
参考:
1、https://stackoverflow.com/questions/19456518/invalid-command-code-despite-escaping-periods-using-sed
2、https://stackoverflow.com/questions/7573368/in-place-edits-with-sed-on-os-x
 
 
 

Tags: sed

cannot create/resize docker.qcow2

mac下面安装过docker,但后来删除过。然后系统又重做过。结果再次安装docker的时候报错,如题(详细 路径不贴了)

找了一下资料,各种各样的都有,最后还是选择了:
XML/HTML代码
  1. sudo rm -r /var/tmp/com.docker.vmnetd.socket  
  2. sudo rm -r ~/Library/Application\ Scripts/com.docker.helper/  
  3. sudo rm -r ~/Library/Containers/com.docker.*  
  4. sudo rm -r ~/Library/Preferences/com.docker.docker.plist  
  5. sudo rm -r ~/Library/Group\ Containers/group.com.docker/  
然后再次运行Docker,一切都解决了
 

Tags: docker

一次半手贱的迁移过程

 

 

» 阅读全文

mac 重新创建管理员账号

 

 

» 阅读全文