Debian 环境下 Dopra 安装步骤全解析
一 名称辨析与准备
sudo apt update && sudo apt install -y ca-certificates curl wget gnupg lsb-releasesudo apt install -y docker.io && sudo systemctl enable --now docker二 安装路径 A 仓库或官方 .deb 包
sudo apt update && sudo apt install -y doprawget https://example.com/dopra.debsudo dpkg -i dopra.debsudo apt --fix-broken install 或 sudo apt-get install -f三 安装路径 B 源码编译
sudo apt install -y build-essential cmake gitgit clone https://github.com/author/dopra.git && cd dopra./configure && make -j$(nproc)mkdir -p build && cd build && cmake .. && make -j$(nproc)sudo make install四 安装路径 C 若实为 Dapr 分布式应用运行时
curl -fsSL https://raw.githubusercontent.com/dapr/cli/master/install/install.sh | /bin/bashdapr --versiondapr initdapr init --runtime-version <版本号> --components-path <自定义路径>docker ps(应能看到 dapr_placement、dapr_redis 等)git clone https://github.com/dapr/quickstarts.git && cd quickstarts/hello-worlddapr run --app-id hello --port 3000 --protocol http -- python3 app.pycurl -H "Content-Type: text/plain" -d "Hello Dapr!" http://localhost:3000五 卸载与常见问题
sudo apt remove --purge dopra && sudo apt autoremove && sudo apt cleandpkg -s dopra 查看包信息);若无,按“定位与清理”处理。make uninstall,执行 sudo make uninstall;否则按“定位与清理”处理。which doprawhereis dopra 或 sudo find / -name "*dopra*" 2>/dev/nullsudo rm -f /usr/bin/dopra(路径以 which 为准);配置文件目录如存在可 sudo rm -rf /etc/doprasudo apt --fix-broken install 或 sudo apt-get install -fsudo,或为当前用户配置 sudo 权限