我正在尝试lablgtk
通过以下方式安装:
opam install lablgtk
它给了我以下错误:
┌─ The following actions failed
│ λ build lablgtk 2.18.11
└─
╶─ No changes have been performed
<><> lablgtk.2.18.11 troubleshooting ><><><><><><><><><><><><><><><><><><><><><>
=> This package requires gtk+ 2.0 development packages installed on your system
The packages you requested declare the following system dependencies. Please
make sure they are installed before retrying:
libexpat1-dev libgtk2.0-dev
我尝试了这个:
sudo apt-get install -y libgtk2.0-dev
但是它说
libgtk2.0-dev is already the newest version (2.24.32-1ubuntu1).
类似的事情也发生在:
sudo apt-get install -y libexpat1-dev
我得到的地方libexpat1-dev is already the newest version (2.2.5-3ubuntu0.2).
我尝试过Ubuntu 18.04LTS 和 20.04LTS。有什么建议可以解决吗?
完整输出:
∗ install lablgtk 2.18.11
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[lablgtk.2.18.11] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of lablgtk failed at
"/home/user/.opam/opam-init/hooks/sandbox.sh build ./configure
--prefix /home/user/.opam/default
LABLGLDIR=/home/user/.opam/default/lib/lablgl".
#=== ERROR while compiling lablgtk.2.18.11 ====================================#
# context 2.0.7 | linux/x86_64 | | https://opam.ocaml.org#87778c51
# path ~/.opam/default/.opam-switch/build/lablgtk.2.18.11
# command ~/.opam/opam-init/hooks/sandbox.sh build ./configure --prefix /home/user/.opam/default LABLGLDIR=/home/user/.opam/default/lib/lablgl
# exit-code 1
# env-file ~/.opam/log/lablgtk-32104-d0f245.env
# output-file ~/.opam/log/lablgtk-32104-d0f245.out
### output ###
# [...]
# checking whether C compiler accepts -fno-unwind-tables... yes
# checking platform... Unix
# checking native dynlink... checking for pkg-config... /home/linuxbrew/.linuxbrew/bin/pkg-config
# checking for GTK+ - version >= 2.0.0... Package gtk+-2.0 was not found in the pkg-config search path.
# Perhaps you should add the directory containing `gtk+-2.0.pc'
# to the PKG_CONFIG_PATH environment variable
# No package 'gtk+-2.0' found
# no
# *** Could not run GTK+ test program, checking why...
# *** The test program failed to compile or link. See the file config.log for the
# *** exact error that occured. This usually means GTK+ is incorrectly installed.
# configure: error: GTK+ is required
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build lablgtk 2.18.11
└─
╶─ No changes have been performed
<><> lablgtk.2.18.11 troubleshooting ><><><><><><><><><><><><><><><><><><><><><>
=> This package requires gtk+ 2.0 development packages installed on your system
The packages you requested declare the following system dependencies. Please
make sure they are installed before retrying:
libexpat1-dev libgtk2.0-dev
which opam
给予/usr/local/bin/opam
和which ocaml
给予/home/linuxbrew/.linuxbrew/bin/ocaml
答案1
我看到您正在使用 LinuxBrew 在 Ubuntu 上安装东西。它可能对其他东西有用,但在当前情况下,它会导致不可预测且不可重现的结果。
因此我建议删除使用 LinuxBrew 安装的 OPAM 和 OCaML,然后使用来自官方存储库的 deb-packages 安装所有内容。
brew uninstall ocaml-findlib
brew uninstall ocaml
brew uninstall opam
brew uninstall gcc
brew uninstall gcc@5
rm -rf ~/.opam
sudo rm -v /usr/local/bin/opam
然后安装 ProVerif,我们可以按照ArchLinux 中的 PKGBUILD。
sudo apt install -y graphviz ocaml-nox liblablgtk2-ocaml-dev
cd ~/Downloads
wget http://prosecco.gforge.inria.fr/personal/bblanche/proverif/proverif2.02pl1.tar.gz
tar -xf proverif2.02pl1.tar.gz
cd proverif2.02pl1/
./build
# optionally run tests
#./test all
#./test-type all
# and install binaries
sudo install -Dm755 proverif /usr/local/bin/proverif
sudo install -Dm755 proveriftotex /usr/local/bin/proveriftotex
sudo install -Dm755 proverif_interact /usr/local/bin/proverif_interact
然后从任何地方以 或 形式调用proverif
可执行proveriftotex
文件proverif_interact
。