


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!

To maximize the efficiency of learning Python in a limited time, you can use Python's datetime, time, and schedule modules. 1. The datetime module is used to record and plan learning time. 2. The time module helps to set study and rest time. 3. The schedule module automatically arranges weekly learning tasks.

Python excels in gaming and GUI development. 1) Game development uses Pygame, providing drawing, audio and other functions, which are suitable for creating 2D games. 2) GUI development can choose Tkinter or PyQt. Tkinter is simple and easy to use, PyQt has rich functions and is suitable for professional development.

Python is suitable for data science, web development and automation tasks, while C is suitable for system programming, game development and embedded systems. Python is known for its simplicity and powerful ecosystem, while C is known for its high performance and underlying control capabilities.

You can learn basic programming concepts and skills of Python within 2 hours. 1. Learn variables and data types, 2. Master control flow (conditional statements and loops), 3. Understand the definition and use of functions, 4. Quickly get started with Python programming through simple examples and code snippets.

Python is widely used in the fields of web development, data science, machine learning, automation and scripting. 1) In web development, Django and Flask frameworks simplify the development process. 2) In the fields of data science and machine learning, NumPy, Pandas, Scikit-learn and TensorFlow libraries provide strong support. 3) In terms of automation and scripting, Python is suitable for tasks such as automated testing and system management.

You can learn the basics of Python within two hours. 1. Learn variables and data types, 2. Master control structures such as if statements and loops, 3. Understand the definition and use of functions. These will help you start writing simple Python programs.

How to teach computer novice programming basics within 10 hours? If you only have 10 hours to teach computer novice some programming knowledge, what would you choose to teach...

How to avoid being detected when using FiddlerEverywhere for man-in-the-middle readings When you use FiddlerEverywhere...


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 Linux new version
SublimeText3 Linux latest version

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

WebStorm Mac version
Useful JavaScript development tools