Introduction#
It's been a long time since I last updated my blog. Recently, I've been at home due to a broken bone and I have nothing to do~~ I'm too lazy to move~~, so I'll update my blog with some random stuff, haha.
Environment Preparation#
These are the environment requirements provided by the Miao-Yunzai repository.
Environment Preparation: Windows or Linux, Node.js (at least version v16 or above), Redis
But, let's take a look at the Redis documentation. Its Windows installation tutorial is actually completed under WSL. So, it's not recommended to tinker with Windows, let's play with a Linux machine instead.
I'm using a 2c2g Alibaba Cloud server here, and all the following steps will be demonstrated using the Ubuntu 20.04 system.
Since I installed everything on a mainland server by default, the installation steps that follow will try to use mainland mirror sources as much as possible~~ (I hope no one really wants to log in to QQ on an overseas machine)~~
Dependency Installation#
Log in to the server using SSH and execute the following commands.
sudo apt update # Refresh the software sources
sudo apt install git redis
Then install node.js. Remember not to install it directly using apt, because the version built into apt is too old.
Here, I installed version v18.15.0-lts, but you can install a different version if you want.
# Download and extract the installation package
wget https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/v18.15.0/node-v18.15.0-linux-x64.tar.gz
tar zxvf node-v18.15.0-linux-x64.tar.gz
# Copy to /usr/local
sudo mkdir /usr/local/nodejs
sudo cp -r node-v18.15.0-linux-x64/* /usr/local/nodejs
# Create symbolic links
sudo ln -s /usr/local/nodejs/bin/node /usr/local/bin
sudo ln -s /usr/local/nodejs/bin/npm /usr/local/bin
# Delete temporary files
rm -rf node-v18.15.0-linux-x64
rm node-v18.15.0-linux-x64.tar.gz
Then, make sure that node.js is installed correctly.
$ node --version
v18.15.0
$ npm --version
9.5.0
Next, install pnpm.
sudo npm --registry=https://registry.npmmirror.com install pnpm -g
pnpm config set registry https://registry.npmmirror.com # Set the mainland mirror source
Installation and Execution#
- Clone the repository.
git clone --depth=1 https://gitee.com/yoimiya-kokomi/Miao-Yunzai.git
cd Miao-Yunzai
git clone --depth=1 https://gitee.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/
- Install dependencies.
pnpm install -P
This step may take some time, so please be patient and relax (lol).
- Run the application.
node app
Then, log in to your account according to the prompt.
Troubleshooting#
-
If you encounter the issue of puppeteer Chromium failing to start.
Try executing the following command.
sudo apt install libatk1.0-0 libatk-bridge2.0-0 libxdamage1 libgbm1 libxkbcommon-dev libpango-1.0-0 libcairo2
- Garbled characters in the generated image.
sudo apt install fontconfig xfonts-utils
Then, upload all the fonts in your computer's C:\Windows\Fonts
directory to /usr/share/fonts
.
Finally, update the font library.
sudo mkfontscale
sudo mkfontdir
References#
- yoimiya-kokomi/Miao-Yunzai: Miao version of Yunzai-V3 (github.com)
- Linux installation of Chinese fonts - Invincible Cactus - Blog Garden (cnblogs.com)
This article is synchronized and updated to xLog by Mix Space.
The original link is https://bdovo.cc/posts/experiences/Install_Yunzai-bot