``` git clone https://github.com/raspberrypi/documentation.git cd documentation sudo apt install -y ruby ruby-dev python3 python3-pip make ninja-build ``` then add these lines to the bottom of your $HOME/.bashrc:
``` export GEM_HOME="$(ruby -e 'puts Gem.user_dir')" export PATH="$PATH:$GEM_HOME/bin" ``` ``` sudo gem install bundler sudo bundle install ``` 如果出现「Bundler 2.5.23 is running, but your lockfile was generated with 2.3.22. Installing Bundler 2.3.22 and restarting using that version.」 ``` sudo gem uninstall bundler sudo gem install bundler -v 2.3.22 ``` ``` # pip3 install --user -r requirements.txt python -m venv env source env/bin/activate pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple make make serve_html ``` You can also use make to delete the build/ and documentation/html/ directories: ``` make clean ```