使用在 Mojave 中运行的 Xcode 10,我无法让简单的测试源编辑器扩展工作。我以前可以在 Xcode 9 High Sierra 下执行此操作。我创建了一个简单的源编辑器扩展。然后我运行它,但没有显示在首次亮相的 Xcode(黑色图标)编辑器菜单下。也不会显示在“系统”>“扩展”列表中。重新启动也没有帮助。我尝试从 Mac App Store 下载 LineX 扩展,但它也不起作用。
我正在尝试使用 Xcode 10.1 将 macos 应用程序从 High Sierra Xcode 9.x 转换为 Mojave
我的 Asset.xcassets 出现错误。错误:两个演绎版的密钥相同
我确实在 Asset.xcassets 文件夹中收到了一些关于图标大小的警告,我已修复这些警告。那不是问题。我已删除 Asset.xcassets 文件夹并将我的信息复制回来。这不是问题。
我已经搜索过但运气不佳。这是错误(在日志中显示)
(M)关键元素:命名元素部分:艺术品图像大小:(空)方向:0 - 水平值:(空)标识符:795 维度1:0 维度2:0 状态:(空)presentationState:(null)previousState:(null ) previousValue: (null) 图层: (null) 比例: 1 色域: sRGB 目标: (null) 外观: (null)
再现1 TDRenditionEntry:0x7fb08c854170
/* com.apple.actool.errors */ ../MacApp/Asset.xcassets: 错误:错误:两个再现的密钥相同
(M)关键元素:命名元素部分:艺术品图像大小:(空)方向:0 - 水平值:(空)标识符:795 维度1:0 维度2:0 状态:(空)presentationState:(null)previousState:(null ) previousValue: (null) 图层: (null) 比例: 1 色域: sRGB 目标: (null) 外观: (null)
再现1 TDRenditionEntry:0x7fb08c854170
我不知道如何确定哪些是相同的,或者不用说,什么是相同的?Swift 和 Xcode 新手。
我创建了一个 GitHub 存储库,然后使用 SSH 克隆它:
git clone git@github.com:BenReilly/all-the-characters.git
Run Code Online (Sandbox Code Playgroud)
我添加了一些文件。
git add .
git commit -m "some message"
git push
Run Code Online (Sandbox Code Playgroud)
这导致系统提示我输入用户名和密码。这本身就有点奇怪,但我还是输入了它们。然后我得到:
> remote: Anonymous access to BenReilly/all-the-characters.git denied.
> fatal: Authentication failed for 'https://github.com/BenReilly/all-the-characters.git/'
Run Code Online (Sandbox Code Playgroud)
HTTPS?什么?
git remote -v
> origin https://github.com/BenReilly/all-the-characters.git (fetch)
> origin https://github.com/BenReilly/all-the-characters.git (push)
Run Code Online (Sandbox Code Playgroud)
啊。
git remote set-url origin git@github.com:BenReilly/all-the-characters.git
git remote -v
> origin https://github.com/BenReilly/all-the-characters.git (fetch)
> origin https://github.com/BenReilly/all-the-characters.git (push)
Run Code Online (Sandbox Code Playgroud)
这是因为它不在我的 osxkeychain 中吗?
只是为了确保我这样做ssh-add -K ~/.ssh/<key id>并确保~/.ssh/config文件已定义。行为没有改变。我还验证了密钥位于我的 GitHub 设置中。
我使用的是 MacOS Mojave (10.14.1),使用 Git …
我是 Mac 新手,我正在尝试使用 VSCode 上的代码运行器扩展在我的 iMessage 上运行一些有趣的统计数据。我一直在关注这篇文章:https://towardsdatascience.com/heres-how-you-can-access-your-entire-imessage-history-on-your-mac-f8878276c6e9
但是,当我运行该行时,conn = sqlite3.connect('/Users/<username>/Library/Messages/chat.db')
我收到错误sqlite3.OperationalError: unable to open database file
据我所知,我的问题是 VScode 没有正确的权限来访问 ~/Library/Messages 文件夹,也可能没有访问 chat.db 的权限。首先,我ls -l在 Library 上运行,结果是drwx---rwxMessages。因此,我尝试同时使用chmod a+rwx Messages和来打开所有内容的权限,但两次都sudo chmod a+rwx Messages出现错误。chmod: Unable to change file mode on Messages: Operation not permitted我做错了什么和/或者有更好的方法吗?或者只是无法更改该文件夹的权限?
我正在尝试测试一个简单的 Python 脚本来发送 macOS 通知:
import UserNotifications
def notif_callback(err):
print("Error in notification callback:",err)
def auth_callback(granted, err):
print("Granted: ",granted,)
print("Error in authorization request: ",err)
content=UserNotifications.UNMutableNotificationContent.alloc().init()
content.setTitle_("Test")
r=UserNotifications.UNNotificationRequest.requestWithIdentifier_content_trigger_('test_notification',content,None)
c=UserNotifications.UNUserNotificationCenter.currentNotificationCenter()
c.requestAuthorizationWithOptions_completionHandler_(0b111111,auth_callback)
c.addNotificationRequest_withCompletionHandler_(r,notif_callback)
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试运行该程序时,出现以下错误
Granted: False
Error in authorization request: Error Domain=UNErrorDomain Code=1 "Notifications are not allowed for this application" UserInfo={NSLocalizedDescription=Notifications are not allowed for this application}
Error in notification callback: Error Domain=UNErrorDomain Code=1 "Notifications are not allowed for this application" UserInfo={NSLocalizedDescription=Notifications are not allowed for this application}
Run Code Online (Sandbox Code Playgroud)
我没有看到我的系统有任何通知授权,操作系统似乎自动拒绝了该请求。在系统偏好设置中,Python已被授予所有通知权限。我在这里缺少什么?
如果我在 MacOS Mojave 上使用 Homebrew 执行此操作:
$ brew install tcl-tk
$ brew install pyenv
$ pyenv install 3.7.4
$ pyenv global 3.7.4
$ python -m tkinter -c 'tkinter._test()'
Run Code Online (Sandbox Code Playgroud)
我得到:
Traceback (most recent call last):
File "/Users/craign/.pyenv/versions/3.7.4/lib/python3.7/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/Users/craign/.pyenv/versions/3.7.4/lib/python3.7/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/Users/craign/.pyenv/versions/3.7.4/lib/python3.7/runpy.py", line 109, in _get_module_details
__import__(pkg_name)
File "/Users/craign/.pyenv/versions/3.7.4/lib/python3.7/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured …Run Code Online (Sandbox Code Playgroud) 当我尝试使用gvim <filename>命令打开文件时,我看到一个闪烁或闪烁的窗口
.
我不确定这是否与Mac OS有关.我已经安装了macvim brew(如何在OS X上安装MacVim?).
虽然存在类似的帖子,但请不要标记这篇文章:VIM闪烁问题,因为问题无法通过遵循答案得到解决(最多投票的答案提到链接断开的屏幕截图).
我正在使用最新的macOS Mojave(10.14).
这看起来已经存在多年了 - 但是我找不到最新的和Mac相关的东西,只处理只安装CPAN模块DBD :: mysql我已经在网上搜索了好几天...
# Failed test 'use DBD::mysql;'
# at t/00base.t line 15.
# Tried to use 'DBD::mysql'.
# Error: Can't load '/Users/robert/.cpanm/work/1542100720.91387/DBD-mysql-4.048/blib/arch/auto/DBD/mysql/mysql.bundle' for module DBD::mysql: dlopen(/Users/robert/.cpanm/work/1542100720.91387/DBD-mysql-4.048/blib/arch/auto/DBD/mysql/mysql.bundle, 2): Symbol not found: _mysql_affected_rows
# Referenced from: /Users/robert/.cpanm/work/1542100720.91387/DBD-mysql-4.048/blib/arch/auto/DBD/mysql/mysql.bundle
# Expected in: flat namespace
# in /Users/robert/.cpanm/work/1542100720.91387/DBD-mysql-4.048/blib/arch/auto/DBD/mysql/mysql.bundle at /usr/local/Cellar/perl/5.28.0/lib/perl5/5.28.0/darwin-thread-multi-2level/DynaLoader.pm line 197.
# ^@ at t/00base.t line 15.
# Compilation failed in require at t/00base.t line 15.
# BEGIN failed--compilation aborted at t/00base.t line 15.
Bailout called. Further testing stopped: Unable to …Run Code Online (Sandbox Code Playgroud) 由于我已更新到MacOs Mojave,因此无法再停止或重新启动Apache。当我运行以下命令时:
sudo apachectl --stop
Run Code Online (Sandbox Code Playgroud)
我总是收到这样的错误:
httpd (pid 101) already running
Run Code Online (Sandbox Code Playgroud)
要停止或重新启动Apache,我实际上需要转到活动监视器,并强制关闭所有“ httpd”进程。有时它可以工作,但有时唯一的方法是重新启动计算机。这个问题发生在Mojave中,在以前的版本中我没有这个问题。
任何解决方案/提示?
谢谢
我第一次在Mac上使用Qemu对计算机进行虚拟化(因为要进行大学作业,因此无法更改该工具)。
我们必须比较在KVM上运行的VM和没有KVM的VM之间的一些度量。
我试图通过调用来启动KVM计算机,qemu-system-x86_64 my.qcow2 -enable-kvm但出现此错误:
qemu-system-x86_64: -machine accel=kvm: No accelerator found
我检查了sysctl -a | grep machdep.cpu.features,这就是我的输出:
machdep.cpu.features:FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE4.1 FSE SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C
由于列出了VMX,因此我认为我的Macbook支持KVM,并且据我所知默认情况下应将其启用。
那么,为什么我会收到此错误,有人对此有解决方案吗?
顺便说一句。我的Macbook Pro是Retina,2014年中的13'版本,运行10.14.1(18B75)。