我正在尝试从这里在 Ubuntu 18.04 LTS 中。该软件包需要“libcurl3”。当我安装它时,它会删除软件包“cmake”和“libcurl4”。如何在不删除 cmake 的情况下安装 StarUML (2.8)?
答案1
这里存在更好的解决方案 - 你可以使用 AppImage官方网站,它有更新的3.0.1版本:
cd ~/Downloads
wget http://staruml.io/download/releases/StarUML-3.0.1-x86_64.AppImage
chmod +x StarUML-3.0.1-x86_64.AppImage
./StarUML-3.0.1-x86_64.AppImage
关于确切的 2.8.1 版本 - 我测试了下面的解决方案(基于这个答案) 和我的想法。
#1. download StarUML package and its dependencies
cd ~/Downloads
wget https://s3.amazonaws.com/staruml-bucket/releases-v2/StarUML-v2.8.1-64-bit.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb
sudo dpkg -i libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/u/udev/libudev0_175-7.2_amd64.deb
sudo dpkg -i libudev0_175-7.2_amd64.deb
#2. install StarUML dependencies but without `libcurl3`
sudo apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 \
libcups2 libdbus-1-3 libexpat1 libfontconfig1 libfreetype6 libgcc1 \
libgconf-2-4 libgcrypt11 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk2.0-0 \
libnspr4 libnss3 libpango1.0-0 libstdc++6 libudev0 libx11-6 libxcomposite1 \
libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 ca-certificates \
lsb-base xdg-utils wget
#3. create folder for locally installed Software and StarUML
mkdir ~/Software ; cd ~/Software
mkdir StarUML ; cd StarUML
#3.1. extract StarUML here
dpkg -x ~/Downloads/StarUML-v2.8.1-64-bit.deb .
#3.2. add this folder to the PATH variable in ~/.bashrc
echo "PATH=$PATH:/home/$USER/Software/StarUML/opt/staruml" >> ~/.bashrc
source ~/.bashrc
#3.3. edit launcher file to reflect the path and add it to menu
cd opt/staruml/
sed -i "s/^Exec=\/opt\/staruml\/staruml\ %U/Exec=\/home\/$USER\/Software\/StarUML\/opt\/staruml\/staruml %U/" staruml.desktop
sed -i "s/^Icon=staruml/Icon=\/home\/$USER\/Software\/StarUML\/usr\/share\/icons\/hicolor\/scalable\/apps\/staruml.svg/" staruml.desktop
chmod +x staruml.desktop
mkdir -p ~/.local/share/applications/
ln -s /home/$USER/Software/StarUML/opt/staruml/staruml.desktop ~/.local/share/applications/staruml.desktop
完成所有这些步骤后,你将能够通过 dash 启动应用程序星形UML快捷方式或从终端使用staruml
命令。