


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!

Python is an interpreted language, but it also includes the compilation process. 1) Python code is first compiled into bytecode. 2) Bytecode is interpreted and executed by Python virtual machine. 3) This hybrid mechanism makes Python both flexible and efficient, but not as fast as a fully compiled language.

Useaforloopwheniteratingoverasequenceorforaspecificnumberoftimes;useawhileloopwhencontinuinguntilaconditionismet.Forloopsareidealforknownsequences,whilewhileloopssuitsituationswithundeterminediterations.

Pythonloopscanleadtoerrorslikeinfiniteloops,modifyinglistsduringiteration,off-by-oneerrors,zero-indexingissues,andnestedloopinefficiencies.Toavoidthese:1)Use'i

Forloopsareadvantageousforknowniterationsandsequences,offeringsimplicityandreadability;whileloopsareidealfordynamicconditionsandunknowniterations,providingcontrolovertermination.1)Forloopsareperfectforiteratingoverlists,tuples,orstrings,directlyacces

Pythonusesahybridmodelofcompilationandinterpretation:1)ThePythoninterpretercompilessourcecodeintoplatform-independentbytecode.2)ThePythonVirtualMachine(PVM)thenexecutesthisbytecode,balancingeaseofusewithperformance.

Pythonisbothinterpretedandcompiled.1)It'scompiledtobytecodeforportabilityacrossplatforms.2)Thebytecodeistheninterpreted,allowingfordynamictypingandrapiddevelopment,thoughitmaybeslowerthanfullycompiledlanguages.

Forloopsareidealwhenyouknowthenumberofiterationsinadvance,whilewhileloopsarebetterforsituationswhereyouneedtoloopuntilaconditionismet.Forloopsaremoreefficientandreadable,suitableforiteratingoversequences,whereaswhileloopsoffermorecontrolandareusefulf

Forloopsareusedwhenthenumberofiterationsisknowninadvance,whilewhileloopsareusedwhentheiterationsdependonacondition.1)Forloopsareidealforiteratingoversequenceslikelistsorarrays.2)Whileloopsaresuitableforscenarioswheretheloopcontinuesuntilaspecificcond


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

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version
Chinese version, very easy to use

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver Mac version
Visual web development tools
