默认情况下,macOS 会限制打开未在Mac App Store上注册的应用程序。Mac App Store(Apps from the Mac App Store)中的应用程序经过Apple认证是安全的。首次下载时,它们不会导致“无法打开某个应用程序或文件,因为它不是来自已识别的开发人员”的警告。
我们将引导您完成验证应用程序的安全性并调整 Mac 的安全配置以允许来自身份不明的开发人员的应用程序的过程。
看门人技术解释
Mac笔记本电脑和电脑配备了多项以安全为重点的技术(several security-focused technologies),例如“Gatekeeper”技术,该技术可验证文件或应用程序的合法性并阻止来自身份不明的开发人员的文件,以保护您的数据并帮助您安全地运行应用程序(protect your data and help you run apps securely)。
只有当您确信相关应用程序是安全的时,您才应该绕过Gatekeeper限制。(Gatekeeper)
通过快捷菜单(Shortcut Menu)打开来自身份不明的开发人员的文件(Developer)
macOS 快捷菜单是打开来自身份不明的开发者的应用程序的最简单方法。
- 按住 Control 键单击(Control-click)(或右键单击)要打开的应用程序或文件,然后选择打开(Open)。
- 在确认提示上再次选择打开以打开应用程序。(Open)这使应用程序不受 Mac 的安全设置的影响,并诱使 macOS 相信该应用程序来自经过验证的来源。
- 系统可能会提示您输入 Mac 的管理员名称和密码以打开或安装应用程序。
- 将来,您只需双击其图标即可打开该应用程序。
(Open Unidentified Apps Through System)通过系统偏好打开未识别的应用程序
您可以从 macOS系统偏好设置(System Preferences)的安全部分绕过 macOS的 Gatekeeper(’ Gatekeeper)保护。当您收到警告警报时,请关闭对话框并打开 Mac 的安全设置,以将应用程序从网关(Gateway)限制中列入白名单。
- 打开系统偏好设置。(System Preferences.)
- 选择安全和隐私(Security & Privacy),然后转到常规(General)选项卡。选择页面底部通知旁边的仍然打开(Open Anyway ),以确认您要打开应用程序而不考虑警告。
- 在确认提示中选择打开(Open)以继续。
修改 Mac 的安全设置
按照以下步骤配置 Mac 的设置,以允许您打开来自未在App Store注册的身份不明的开发者的文件。
- 转到系统偏好设置(System Preferences)>安全和隐私(Security & Privacy)>常规(General)。
- 选择左下角的锁定图标以解锁(lock icon)安全(Security)和隐私(Privacy)首选项。
- 输入 Mac 的密码或使用Touch ID进行身份验证。
- 在“允许从以下位置下载应用程序”部分选择App Store 和确定的开发人员。(App Store and identified developers)
检查您是否能够打开应用程序或文件而不会收到错误消息。
如果错误消息仍然存在,请继续执行以下部分。
使用终端(Unidentified Developers Using Terminal)打开来自身份不明的开发人员的文件
macOS 有一个隐藏的安全选项,可让您在Mac上安装应用程序或打开来自身份不明的开发人员的文件。如果您的Mac运行的是 macOS El Capitan或更早版本,您将在系统偏好设置(System Preferences)中找到此选项。对于运行 macOS Sierra或更新版本的设备,您需要通过Terminal取消隐藏该选项。
关闭系统偏好设置(Preferences)窗口并按照以下步骤操作:
- 转到Finder > Applications > Utilities并选择Terminal。
- 将以下命令粘贴到终端(Terminal)控制台中,然后按Enter。
sudo spctl –master-disable
- 输入 Mac 的管理员密码,然后按Enter。
- 打开System Preferences,选择Security & Privacy,选择General,单击左下角的锁定图标(lock icon),然后输入您的 Mac 密码。
- 在“允许从以下位置下载应用程序”部分中选择任意位置。(Anywhere)
- 如果您在页面上没有找到“Anywhere”选项,请关闭并重新打开System Preferences,然后再次检查。
如果您想阻止Mac打开来自任何开发人员的文件,请隐藏“任何地方”选项。在终端控制台中粘贴sudo spctl –master-enable并按Enter。在控制台中输入您的 Mac 密码,然后按Enter继续。
谨慎打开
虽然一些身份不明的应用程序是安全的并且没有恶意代码,但其他应用程序可能包含病毒和恶意软件。使用您的Mac 防病毒应用程序(Mac antivirus app)或在线防病毒扫描程序(online antivirus scanners)在打开来自不明来源的文件之前确认它们的安全性。在互联网(论坛、社交媒体等)上阅读其他Mac用户的评论是在安装应用程序之前验证应用程序安全性的另一种好方法。
如果您从 Internet 安装第三方软件,请直接从开发者网站下载应用程序的磁盘映像或软件包文件。此外,请确保您下载了最新版本的应用程序 - 旧版本可能包含会在安装过程中触发警告警报的错误或恶意软件。
How to Open Files from Unidentified Developers on Mac
By default, macOS restricts the opening of appѕ not registered on the Mac App Store. Apps from the Mac App Store are Apple certified to be safe. They do not result in a warning that it “cannot open a certain app or file because it is not from an identified developer” when first downloaded.
We’ll walk you through the process of verifying an app’s safety and adjusting your Mac’s security configurations to allow apps from unidentified developers.
The Gatekeeper Technology Explained
Mac notebooks and computers ship with several security-focused technologies, like the “Gatekeeper” technology, which verifies the legitimacy of a file or app and blocks files from unidentified developers to protect your data and help you run apps securely.
You should only bypass the Gatekeeper restriction if you’re confident that the app in question is safe.
Open Files from An Unidentified Developer Through the Shortcut Menu
The macOS shortcut menu is the easiest way to open apps from unidentified developers.
- Control-click (or right-click) the app or file you want to open and select Open.
- Select Open again on the confirmation prompt to open the app. This exempts the app from your Mac’s security settings and tricks macOS into believing that the app is from a verified source.
- You may be prompted to enter your Mac’s admin name and password to open or install the app.
- In the future, you’ll be able to open the app just by double-clicking its icon.
Open Unidentified Apps Through System Preferences
You can bypass macOS’ Gatekeeper protection from the security section of macOS System Preferences. When you get the warning alert, close the dialog box and open your Mac’s security settings to whitelist the app from the Gateway restriction.
- Open System Preferences.
- Select Security & Privacy and go to the General tab. Select Open Anyway next to a notification at the bottom of the page to confirm that you want to open the app regardless of the warning.
- Select Open on the confirmation prompt to proceed.
Modify Your Mac’s Security Settings
Follow the steps below to configure your Mac’s settings to allow you to open files from unidentified developers not registered on the App Store.
- Go to System Preferences > Security & Privacy > General.
- Select the lock icon in the bottom-left corner to unlock the Security & Privacy preferences.
- Enter your Mac’s password or authenticate using Touch ID.
- Select App Store and identified developers in the “Allow apps downloaded from” section.
Check if you’re able to open the app or file without getting an error message.
If the error message persists, continue to the section below.
Open Files From Unidentified Developers Using Terminal
macOS has a hidden security option that allows you to install apps or open files from unidentified developers on your Mac. If your Mac is running macOS El Capitan or older, you’ll find this option in System Preferences. For devices running macOS Sierra or newer, you’ll need to unhide the option via Terminal.
Close the System Preferences window and follow these steps:
- Go to Finder > Applications > Utilities and select Terminal.
- Paste the command below in the Terminal console and press Enter.
sudo spctl –master-disable
- Enter your Mac’s admin password and press Enter.
- Open System Preferences, select Security & Privacy, select General, click the lock icon in the bottom-left corner, and enter your Mac’s password.
- Select Anywhere in the “Allow apps downloaded from” section.
- If you don’t find the “Anywhere” option on the page, close and reopen System Preferences, and check again.
Hide the “Anywhere” option if you want to stop your Mac from opening files from any developer. Paste sudo spctl –master-enable in the Terminal console and press Enter. Type your Mac’s password in the console and press Enter to proceed.
Open With Caution
While some unidentified apps are safe and free of malicious code, others could house viruses and malware. Use your Mac antivirus app or online antivirus scanners to confirm the safety of files from unidentified sources before opening them. Reading reviews from other Mac users on the internet—forums, social media, etc.—is another good way to verify the safety of an app before installing it.
If you’re installing third-party software from the internet, download the app’s disk image or package file directly from the developer’s website. Additionally, make sure you download the latest version of the app—older versions might contain bugs or malware that’ll trigger a warning alert during installation.