[小技巧] synology 安装 brew

date
Feb 1, 2024
slug
tip-synology-homebrew
status
Published
summary
小技巧
tags
tip
type
Post
URL

Problem & Summary

Solution

# ssh to synology as an admin
sudo -i
cat > /usr/bin/ldd <<EOF
#!/bin/bash
[[ $(/usr/lib/libc.so.6) =~ version\ ([0-9]\.[0-9]+) ]] && echo "ldd ${BASH_REMATCH[1]}"
EOF

chmod 755 /usr/bin/ldd

# check 
ldd --version

# Homebrew on Linux 建议最好安装在 /home/linuxbrew/.linuxbrew 下,然而群晖系统的用户目录在 /volume1/homes
sudo mkdir /home
sudo mount -o bind "/volume1/homes" /home


# 推荐让群晖的系统开机启动是执行一下这个挂载命令。在 任务计划 => 新增 => 触发的任务 添加以 root 用户执行的脚本
#!/bin/sh
sleep 10
mount -o bind "/volume1/homes" /home

# exit to admin user account
exit

http_proxy=http://127.0.0.1:15004 \
https_proxy=$http_proxy \
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"


export HOMEBREW_TEMP=~/tmp
echo 'export HOMEBREW_TEMP=~/tmp' >> ~/.profile

# sudo
sudo -i 
chmod +t /volume1/homes/adminlp11kx/tmp
exit



# clean up
Troubleshooting:
  brew config
  brew doctor


# 食用方式
  brew install --verbose --debug FORMULA|CASK

Screenshots

notion image

© Ying Bun 2021 - 2024