macOS X 15.7 brew安装mariadb 记录RuntimeError

文章讲述了在旧版本的macOS10.15环境下,作者通过Homebrew安装MariaDB时遇到的依赖问题,包括lz4和zstd的处理,以及如何进行简单的安全配置和启动服务的过程。
摘要由CSDN通过智能技术生成

macOS X 15.7 brew安装mariadb

新环境

新环境需要安装的组件很多

==> Fetching dependencies for mariadb: mecab, mecab-ipadic, cmake, msgpack, ca-certificates, openssl@3, groonga pcre2 lz4 xz zstd bison fmt

手动逐步安装 只留zstd

安装mariadb

like@likes-iMac homebrew-cask % brew install mariadb
Warning: You are using macOS 10.15.
We (and Apple) do not provide support for this old version.
It is expected behaviour that some formulae will fail to build in this old version.
It is expected behaviour that Homebrew will be buggy and slow.
Do not create any issues about this on Homebrew’s GitHub repositories.
Do not create any issues even if you think this message is unrelated.
Any opened issues will be immediately closed without response.
Do not ask for help from Homebrew or its maintainers on social media.
You may ask for help in Homebrew’s discussions but are unlikely to receive a response.
Try to figure out the problem yourself and submit a fix as a pull request.
We will review it but may or may not accept it.

==> Fetching dependencies for mariadb: zstd
==> Fetching zstd
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/6b3ce016a5a98cb368a176a5fd602858d4
#################################################################################################### 100.0%
==> Downloading https://github.com/facebook/zstd/archive/refs/tags/v1.5.5.tar.gz
Already downloaded: /Users/like/Library/Caches/Homebrew/downloads/0f2c3a8e3bcdef06ea1d1bcbf0cc6fe334726af8b5984cd6dd76a4f6d4d7b896–v1.5.5.tar.gz
==> Fetching mariadb
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/6b3ce016a5a98cb368a176a5fd602858d4
#################################################################################################### 100.0%
==> Downloading https://github.com/MariaDB/server/commit/3624a36aed0346380255b141cb8a59998aaca4ee.patch?ful
Already downloaded: /Users/like/Library/Caches/Homebrew/downloads/9219725d44f9bbb7476f5d33488ef4e720a7079482e06adc97b9ca0777c015e8–3624a36aed0346380255b141cb8a59998aaca4ee.patch
==> Downloading https://archive.mariadb.org/mariadb-11.3.2/source/mariadb-11.3.2.tar.gz
Already downloaded: /Users/like/Library/Caches/Homebrew/downloads/0826e5fb192ac7d9de69109d0848f318ac6c0b7e0f07da05a9391a50a12de31f–mariadb-11.3.2.tar.gz
==> Installing dependencies for mariadb: zstd
==> Installing mariadb dependency: zstd
Error: An exception occurred within a child process:
RuntimeError: /usr/local/opt/lz4 not present or broken
Please reinstall lz4. Sorry 😦

去掉提示的lz4RuntimeError

brew uninstall lz4

再次安装mariadb

brew install mariadb

==> Installing dependencies for mariadb: lz4 and zstd
==> Installing mariadb dependency: lz4
==> Pouring lz4-1.9.4.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/lz4/1.9.4: 22 files, 680.2KB

==> Installing mariadb dependency: zstd
==> cmake -S build/cmake -B builddir -DZSTD_PROGRAMS_LINK_SHARED=ON -DZSTD_BUILD_CONTRIB=ON -DCMAKE_INSTALL
==> cmake --build builddir
==> cmake --install builddir
🍺 /usr/local/Cellar/zstd/1.5.5: 31 files, 2.5MB, built in 27 seconds
==> Installing mariadb
==> Patching
==> Applying 3624a36aed0346380255b141cb8a59998aaca4ee.patch
==> Summary
🍺 /usr/local/Cellar/mariadb/11.3.2: 950 files, 228.6MB, built in 12 minutes 33 seconds
==> Running brew cleanup mariadb

启动MariaDB:

brew services start mariadb

MariaDB运行信息:

brew services info mariadb

简单安全配置

mysql_secure_installation

进入 mysql

执行测试

create database macdb default charset ‘utf8’;

正常
MariaDB> show create database macdb;

  • 21
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值