mac设置开机启动app_Mac App无法启动? 这是解决方法

mac设置开机启动app

mac设置开机启动app

A man frowning at a MacBook screen.
pathdoc/Shutterstock pathdoc /快门

So, you’ve downloaded and installed a new Mac app, only for it to refuse to open. Now, you’ve got to work out whether it’s a problem with macOS, an incompatibility issue, or even a security threat. Let’s try to solve the problem and launch that app.

因此,您已经下载并安装了新的Mac应用程序,只是拒绝打开该应用程序。 现在,您必须确定这是macOS的问题,不兼容的问题,甚至是安全威胁。 让我们尝试解决问题并启动该应用程序。

Gatekeeper阻止未签名的应用程序运行 (Gatekeeper Prevents Unsigned Apps From Running)

If you get an error that says an application “can’t be opened because the developer cannot be verified,” Gatekeeper is to blame.

如果出现错误,指出应用程序“由于无法验证开发人员而无法打开”,则应归咎于Gatekeeper

A macOS Gatekeeper error message.

Gatekeeper was first introduced in 2012 with the release of Mac OS X 10.8 Mountain Lion. It’s a security feature that stops an app from running if it hasn’t been signed with a certified Apple developer certificate. On modern versions of macOS, unsigned software simply won’t run unless you go out of your way to approve it.

Gatekeeper于2012年首次发布,并发布了Mac OS X 10.8 Mountain Lion。 如果未使用经过认证的Apple开发人员证书对应用进行签名,则该安全功能可阻止该应用运行。 在现代版本的macOS上,除非您全力以赴,否则未经签名的软件将无法运行。

Apple has gradually made it even more difficult to run potentially dangerous software. In older versions of the operating system, you could turn off Gatekeeper, but as of macOS Sierra, it’s here to stay.

苹果逐渐使运行潜在危险软件变得更加困难。 在较早版本的操作系统中,您可以关闭Gatekeeper,但是从macOS Sierra开始,它将一直存在。

To circumvent Gatekeeper, immediately after trying to run the app in question, launch System Preferences > Security and Privacy, and then click the “General” tab. You should see a message at the bottom that says an application was blocked “because it is not from an identified developer.”

要绕过Gatekeeper,请在尝试运行有问题的应用程序后立即启动“系统偏好设置”>“安全性和隐私”,然后单击“常规”选项卡。 您应该在底部看到一条消息,指出应用程序被阻止,因为它不是来自确定的开发人员。

The "General" tab under "Security and Privacy" on macOS.

Click “Open Anyway,” and then click “Open” in the popup that appears. You’ve now indicated to the operating system that you approve of the app in question, and you won’t be hassled about it again.

单击“仍然打开”,然后在出现的弹出窗口中单击“打开”。 现在,您已向操作系统表明您已批准有问题的应用程序,并且不会再为它烦恼。

未签名的应用程序有危险吗? (Are Unsigned Apps Dangerous?)

Unsigned apps aren’t inherently dangerous, but the vast majority of security threats come from so-called “unsigned” software. An unsigned application simply means the developer hasn’t registered with Apple. This requires an annual fee, and some developers just can’t afford it.

未签名的应用程序并不是天生就有危险的,但是绝大多数安全威胁来自所谓的“未签名”软件。 未签名的应用程序仅表示开发人员尚未向Apple注册。 这需要年费,而有些开发人员负担不起。

Open-source projects, in particular, usually have minuscule budgets, with programmers contributing their time as volunteers. Similarly, a hobbyist who creates a small, free app might not want to pay for a developer’s account when he or she won’t be making any money from it.

尤其是开源项目,通常预算很少,而程序员则贡献自己的时间作为志愿者。 同样,创建一个免费的小型应用程序的业余爱好者可能不会为开发者的帐户赚钱,而不必为此付费。

If you know where the app comes from and you trust the download source, you shouldn’t be put off just because it’s unsigned. Specific types of apps, like file-sharing clients, aren’t eligible for Apple’s approval in the first place.

如果您知道应用程序的来源,并且信任下载源,则不应因为未签名而推迟应用程序。 特定类型的应用程序(例如文件共享客户端)首先没有资格获得Apple的批准。

更新过时的32位应用程序 (Update Outdated 32-Bit Apps)

If you get an error telling you an app “needs to be updated,” you’re likely trying to run outdated, 32-bit software.

如果在告诉您某个应用“需要更新”时出错,则可能是您尝试运行过时的32位软件。

A macOS outdated app error message.

macOS Catalina officially ditched support for 32-bit apps when it arrived in the fall of 2019. The decision to go pure 64-bit resulted in an all-round more efficient operating system, but disabled 32-bit apps. If you want to run those, your best bet is to create a virtual machine that runs macOS Mojave or earlier.

macOS Catalina于2019年秋季上市时正式放弃对32位应用程序的支持。决定采用纯64位版本的决定导致了一个更加高效的操作系统,但禁用了32位应用程序。 如果要运行它们,最好的选择是创建一个运行macOS Mojave或更早版本的虚拟机

When you encounter this problem, you’ll have to download the 64-bit version of the app you want to run. Since macOS has supported both 64- and 32-bit software for a while, many developers already have 64-bit versions of their apps available.

遇到此问题时,您必须下载要运行的应用程序的64位版本。 由于macOS一段时间以来都支持64位和32位软件,因此许多开发人员已经拥有其应用程序的64位版本。

Head to the app’s website and look for the latest version. If the project is no longer being maintained, it might be time to find an alternative.

前往该应用程序的网站并查找最新版本。 如果不再维护该项目,则可能是时候寻找替代方案了

This won’t affect any apps you purchased from the App Store, as all outdated 32-bit versions have been removed. Developers must provide 64-bit versions if they want to be included in the store.

这不会影响您从App Store购买的任何应用程序,因为所有过时的32位版本均已删除。 如果要包含在商店中,开发人员必须提供64位版本。

修复Catalina的权限问题 (Fix Catalina’s Permissions Issues)

Sometimes, you might get a vague error message that simply says, “The application (app name) can’t be opened.” This error seems to be related to a permissions issue with some apps and macOS Catalina.

有时,您可能会得到含糊不清的错误消息,内容为:“无法打开该应用程序(应用程序名称)。” 此错误似乎与某些应用程序和macOS Catalina的权限问题有关。

Fix Catalina's Permission Errors to Run Apps Again

Fortunately, you can usually fix it with a simple console command. To do so, you’ll need to know exactly how the app’s name appears in the “Applications” folder. To find out, open Finder and click “Applications” in the sidebar. Scroll down to the app to see its exact name. You’ll need to append “.app” to the end of its name, as shown in the example below.

幸运的是,您通常可以使用简单的控制台命令对其进行修复。 为此,您需要确切知道该应用程序的名称在“应用程序”文件夹中的显示方式。 要找出答案,请打开Finder并单击侧栏中的“应用程序”。 向下滚动到该应用以查看其确切名称。 您需要在其名称的末尾附加“ .app”,如下面的示例所示。

Armed with that information, open Terminal by searching for it in Spotlight search (press Command+Space and type “Terminal”), or head to Applications > Utilities and open it there.

有了这些信息,可以通过在Spotlight搜索中进行搜索来打开终端(按Command + Space并键入“ Terminal”),或转到“应用程序”>“实用程序”并在那里打开它。

Type the following command, replacing “Appname.app” with the name of the app you’re trying to run, and then press Enter:

键入以下命令,将“ Appname.app”替换为您要运行的应用程序的名称,然后按Enter:

chmod +x /Applications/Appname.app/Contents/MacOS/*

If there’s a space in the title of the app, you’ll have to use \ to escape it. For example, for the Golf Peaks app mentioned in the image above, you’d have to type the following command:

如果应用程序标题中有空格,则必须使用\对其进行转义。 例如,对于上图中提到的Golf Peaks应用程序,您必须输入以下命令:

chmod +x /Applications/Golf\ Peaks.app/Contents/MacOS/*

This error seems to be limited to older apps running on macOS Catalina. The chmod command allows you to change permissions on Unix and Unix-like operating systems. By running chmod +x, you’re making the specified directory executable so your Mac can run the files inside it.

此错误似乎仅限于在macOS Catalina上运行的旧版应用程序。 chmod命令允许您更改Unix和类似Unix的操作系统上的权限。 通过运行chmod +x ,您可以使指定的目录可执行,以便Mac可以在其中运行文件。

XProtect阻止了恶意应用 (Malicious Apps Are Blocked by XProtect)

If you get an error message saying an app “will damage your computer” with an option to move it straight to the trash, your Mac has blocked potential malware from running. Unfortunately, there’s nothing you can do to circumvent this.

如果您收到一条错误消息,指出某个应用程序“将损坏您的计算机”,并且可以选择将其直接移至垃圾桶,则表明您的Mac已阻止运行潜在的恶意软件。 不幸的是,您无法采取任何措施来规避这一问题。

macOS has a built-in anti-malware feature called XProtect, which Apple constantly updates with rules for identifying malicious software. If an app you’re trying to run breaks those rules, macOS will flatly refuse to run it.

macOS具有称为XProtect内置反恶意软件功能 ,Apple会不断更新其识别恶意软件的规则。 如果您尝试运行的应用违反了这些规则,macOS将断然拒绝运行它。

Not every app flagged by XProtect is malware in the traditional sense. In particular, keygens and cracks used to pirate software are detected and blocked by XProtect, even if they pose no immediate threat to your system.

并非XProtect标记的每个应用程序都是传统意义上的恶意软件。 特别是,XProtect会检测并阻止用于盗版软件的密钥源和破解,即使它们对系统没有直接威胁也是如此。

第三方防病毒也阻止了应用程序 (Third-Party Antivirus Also Blocks Apps)

You don’t really need an antivirus for a Mac. Apple’s cautious approach to security through features like app sandboxing, Gatekeeper, System Integrity Protection, and XProtect means you’re safe from most threats. Mac malware absolutely exists, it’s just not as prevalent as it is on Windows or Android.

Mac 确实不需要防病毒软件 。 苹果通过应用沙盒 ,关守, 系统完整性保护和XProtect等功能对安全性采取谨慎的态度,这意味着您可以免受大多数威胁的侵害。 Mac恶意软件绝对存在,但并不像Windows或Android上那样普遍。

Third-party security apps, like Malwarebytes for Mac, run in real time, and scan files and apps as you use them. If your antivirus doesn’t like a particular app, it might prevent you from opening it. You’ll either need to temporarily disable your antivirus or add an exception to circumvent this.

第三方安全应用程序(如Mac的Malwarebytes)实时运行,并在使用它们时扫描文件和应用程序。 如果您的防病毒软件不喜欢特定的应用程序,则可能会阻止您打开它。 您可能需要暂时禁用防病毒软件或添加例外来规避此问题。

Just make sure you know what you’re dealing with; if an app was blocked, there could be a good reason for it.

只需确保您知道自己在处理什么; 如果某个应用程序被阻止,则可能有充分的理由。

Mac App Store应用程序可避免大多数问题 (Mac App Store Apps Avoid Most Issues)

Apps you download from the App Store usually just work. Again, this is because any apps available there must adhere to Apple’s guidelines, which means staying abreast of Apple’s rules with frequent updates and fixes.

您从App Store下载的应用通常都可以使用。 同样,这是因为那里可用的任何应用程序都必须遵守Apple的准则,这意味着要经常更新和修复最新的Apple规则。

Anything you download from the App Store is signed and won’t be stopped by Gatekeeper. All of those apps are all sandboxed, which means the system limits how much they can interact with the most important parts of the operating system.

您从App Store下载的所有内容均已签名,并且不会被Gatekeeper阻止。 所有这些应用程序都被沙盒化,这意味着系统限制了它们与操作系统最重要部分的交互程度。

Unfortunately, not all apps are available in the App Store, but you shouldn’t be wary of installing apps from other sources.

不幸的是,并不是所有的应用程序都可以在App Store中获得,但是您应该警惕从其他来源安装应用程序

翻译自: https://www.howtogeek.com/682509/mac-app-not-starting-heres-how-to-fix-it/

mac设置开机启动app

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
macOS 上,可以通过编写 shell 脚本和设置 Launch Agent,实现开机启动指定的应用程序或脚本。 以下是一个简单的示例,演示如何编写 shell 脚本和设置 Launch Agent,使其在 macOS 开机时自动运行: 1. 编写 shell 脚本 在终端中打开一个新文件,然后输入以下内容: ``` #!/bin/sh open /Applications/TextEdit.app ``` 这个脚本将在开机后打开 TextEdit 应用程序。您可以将 `open` 命令替换为您想要运行的任何其他命令。 2. 将脚本保存到合适的位置 将脚本保存到您希望在开机时运行的位置。例如,您可以将其保存到您的 home 目录下的 Documents 文件夹中。 3. 创建 Launch Agent 文件 在终端中打开一个新文件,然后输入以下内容: ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.example.myapp</string> <key>ProgramArguments</key> <array> <string>/bin/sh</string> <string>/Users/yourusername/Documents/myapp.sh</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> ``` 将此文件保存为 `com.example.myapp.plist`。请注意,您需要将 `ProgramArguments` 中的路径替换为您保存脚本的路径,并将 `Label` 更改为您喜欢的任何内容。 4. 将 Launch Agent 文件复制到适当的位置 在终端中,将 `com.example.myapp.plist` 文件复制到 `~/Library/LaunchAgents/` 目录中,如下所示: ``` cp com.example.myapp.plist ~/Library/LaunchAgents/ ``` 5. 加载 Launch Agent 在终端中,运行以下命令以加载 Launch Agent: ``` launchctl load ~/Library/LaunchAgents/com.example.myapp.plist ``` 6. 测试 现在,您可以重启您的 Mac,看看您的脚本是否在开机后自动运行。如果一切正常,TextEdit 应该会打开。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值