


How to upgrade the openssl that comes with Mac? (Process summary)
How to upgrade the openssl that comes with Mac? The following article will introduce to you the upgrade process of openssl that comes with Mac. You can refer to it if necessary.
Since the openssl
that comes with Mac is too old, here you need to upgrade to a higher version to install the python expansion package, so let’s summarize the upgrade process.
1. Install openssl
First, let’s take a look at our openssl version and directory:
-> ~ openssl version OpenSSL 0.9.8zh 14 Jan 2016 -> ~ which openssl /usr/bin/openssl -> ~
Through the above review, it is obvious that our version number is too low.
Follow the above steps, we first update homebrew
brew update
Installation:
brew install openssl # 重新安装 # brew reinstall openssl
After successful installation:
~ brew reinstall openssl ==> Reinstalling openssl ==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2p.el_capitan.bottle.tar.gz Already downloaded: /Users/kaiyiwang/Library/Caches/Homebrew/downloads/96bc2acd84d0fe609dcbe4c6436c864808f7e8f26f2f12111f552f5972c3840a--openssl-1.0.2p.el_capitan.bottle.tar.gz ==> Pouring openssl-1.0.2p.el_capitan.bottle.tar.gz ==> Caveats A CA file has been bootstrapped using certificates from the SystemRoots keychain. To add additional certificates (e.g. the certificates added in the System keychain), place .pem files in /usr/local/etc/openssl/certs and run /usr/local/opt/openssl/bin/c_rehash openssl is keg-only, which means it was not symlinked into /usr/local, because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries. If you need to have openssl first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.zshrc For compilers to find openssl you may need to set: export LDFLAGS="-L/usr/local/opt/openssl/lib" export CPPFLAGS="-I/usr/local/opt/openssl/include" ==> Summary /usr/local/Cellar/openssl/1.0.2p: 1,793 files, 12.2MB
Instruct us Successfully installed openssl to /usr/local/Cellar/openssl/1.0.2p
.
2. Replace the old one
However, we still have the last step, that is, when we use openssl, we use the newly downloaded openssl with homebrew. To achieve this goal, we have two methods.
Put the opensslsoft link
downloaded by homebrew to the /usr/bin/openssl
directory. Here, we first save an old copy of it, and then soft link the newly downloaded one.
$ mv /usr/bin/openssl /usr/bin/openssl_old mv: rename /usr/bin/openssl to /usr/bin/openssl_old: Operation not permitted $ ln -s /usr/local/Cellar/openssl/1.0.2p/bin/openssl /usr/bin/openssl ln: /usr/bin/openssl: Operation not permitted
Operation not permitted prompts that there is no permission to operate. I have encountered this problem several times for things in the /usr/bin directory, so I continued to google and found Operation Not on stackoverflow. Permitted when on root El capitan (rootless disabled)
.
Restart the system. When starting, we press cmd r at the same time to enter Recovery mode, then select Utility => Terminal, enter the following command in the terminal, lock the interface file system, and restart the computer (cmd r After that, you will enter another interface for selecting system startup. Do not restart immediately in this interface. First find the terminal and enter csrutil disable) in the terminal:
$ csrutil disable $ reboot
Finally, we execute the previous two commands to view Version.
$ sudo mv /usr/bin/openssl /usr/bin/openssl_old $ sudo ln -s /usr/local/Cellar/openssl/1.0.2p/bin/openssl /usr/bin/openssl $ openssl version OpenSSL 1.0.2p 14 Aug 2018 ➜ ~ which openssl /usr/local/opt/openssl/bin/openssl
In this way, our openssl upgrade was successful. However, just to be on the safe side, I restarted my computer and re-enabled csrutil.
csrutil enable reboot
Related recommendations:
macos - How to perform a major version upgrade of PHP that comes with Mac?
The above is the detailed content of How to upgrade the openssl that comes with Mac? (Process summary). For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The following five methods can be used to open a macOS terminal: Use Spotlight Search through application folders Use Launchpad to use shortcut keys Command Shift U through terminal menus

To delete an extra ServerName directive from Apache, you can take the following steps: Identify and delete the extra ServerName directive. Restart Apache to make the changes take effect. Check the configuration file to verify changes. Test the server to make sure the problem is resolved.

How to view system name in macOS: 1. Click the Apple menu; 2. Select "About Native"; 3. The "Device Name" field displayed in the "Overview" tab is the system name. System name usage: identify Mac, network settings, command line, backup. To change the system name: 1. Access About Native Machine; 2. Click the "Name" field; 3. Enter a new name; 4. Click "Save".

Open a file in a macOS terminal: Open the terminal to navigate to the file directory: cd ~/Desktop Use open command: open test.txtOther options: Use the -a option to specify that a specific application uses the -R option to display files only in Finder

To restart the Apache server, follow these steps: Linux/macOS: Run sudo systemctl restart apache2. Windows: Run net stop Apache2.4 and then net start Apache2.4. Run netstat -a | findstr 80 to check the server status.

macOS has a built-in "Screen Recording" application that can be used to record screen videos. Steps: 1. Start the application; 2. Select the recording range (the entire screen or a specific application); 3. Enable/disable the microphone; 4. Click the "Record" button; 5. Click the "Stop" button to complete. Save the recording file in .mov format in the "Movies" folder.

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

Steps to install fonts in macOS: Download the font file from a reliable source. Use the font preview program or terminal to install it into the system font folder (the sudo command is required to share it by users). Verify the installation in Font Book. Select the installed font to use in the application.
