macos brew install 怎么查看安装时选择了哪些选项
比如安装PHP,
我们会先通过命令brew options php71
查看有哪些选项是可以选择的。
--with-cgi
Enable building of the CGI executable (implies --without-fpm)
--with-debug
Compile with debugging symbols
--with-embed
Compile with embed support (built as a static library)
--with-enchant
Build with enchant support
--with-gmp
Build with gmp support
--with-homebrew-curl
Include Curl support via Homebrew
--with-homebrew-libressl
Include LibreSSL instead of OpenSSL via Homebrew
--with-homebrew-libxml2
Include Libxml2 support via Homebrew
--with-homebrew-libxslt
Include LibXSLT support via Homebrew
--with-httpd
Enable building of shared Apache Handler module
--with-imap
Include IMAP extension
--with-libmysql
Include (old-style) libmysql support instead of mysqlnd
--with-mssql
Include MSSQL-DB support
--with-pdo-oci
Include Oracle databases (requries ORACLE_HOME be set)
--with-pear
Build with PEAR
--with-phpdbg
Enable building of the phpdbg SAPI executable
--with-postgresql
Build with postgresql support
--with-thread-safety
Build with thread safety
--with-webp
Build with webp support
--without-bz2
Build without bz2 support
--without-fpm
Disable building of the fpm SAPI executable
--without-ldap
Build without LDAP support
--without-legacy-mysql
Do not include the deprecated mysql_ functions
--without-mysql
Remove MySQL/MariaDB support
--without-pcntl
Build without Process Control support
--without-unixodbc
Build without unixODBC support
--HEAD
Install HEAD version
比如我选择这样子安装:
brew install php71 --with-homebrew-curl --with-homebrew-libressl
然后过了一段时间,我发现还需要加一个参数--with-httpd
,能不能不卸载直接加上这个选项?
如果必须卸载掉重新安装,
那我要怎么查看第一次安装时选择了哪些选项?还是只能凭记忆?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
brew 是通过ruby脚本来完成安装管理的.
通过
可以打开编辑器编辑相应的的安装脚本
通过查看
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Formula/php71.rb
及其相关的依赖项目/usr/local/Homebrew/Library/Taps/homebrew/homebrew-php/Abstract/abstract-php.rb
可以看到, 以php71为例, 脚本并不没有把相关的依赖项目--with-XXX
保存到磁盘(方法 _install及 install_args).所以不严密的结论是,默认情况下没有办法知道上次安装都有哪些选项.
可能通过
来查看依赖关系和可能选项.
因为一些选项是包的编译选项, 所以更改选项估计只能通过重装才行.
安装或系统改动保留脚本是个好习惯,记忆是不可靠的.
可以用CTRL>+R最近的输入历史, 或用
history
查看以往操作.