Avagadro 1.2 ubuntu 16 安装错误。CMAKE make

Avagadro 1.2 ubuntu 16 安装错误。CMAKE make

我一直尝试在 ubuntu 16.4 中安装 Avogadro 1.2,我按照所有步骤并安装了所有缺少的依赖项,但最终在编译时出现此错误:cmake ../ 并根据安装文件说明进行命令步骤。

我尝试了来自 github 上 avogadro 自己网站的不同版本,但都出现了同样的错误。我还删除了 eigen3 并安装了 eigen2 版本,但问题依然存在。

但是它在 ubuntu bionic 中运行良好,因为它是默认包。 https://launchpad.net/ubuntu/+source/avogadro/1.2.0-4build1

因此,如果有人指导我从上面的链接进行安装或修复下面的错误,那么我会很高兴。

surya@surya-Inspiron-N5010:~/avogadro-master/build$ make
[  0%] Generating moc_elementcolor.cxx
Scanning dependencies of target elementcolor
[  0%] Building CXX object libavogadro/src/colors/CMakeFiles/elementcolor.dir/elementcolor.cpp.o
In file included from /usr/local/include/openbabel-2.0/openbabel/atom.h:33:0,
                 from /usr/local/include/openbabel-2.0/openbabel/mol.h:42,
                 from /home/surya/avogadro-master/libavogadro/src/colors/elementcolor.cpp:31:
/usr/local/include/openbabel-2.0/openbabel/base.h:287:68: warning: unused parameter ‘replaceNewlines’ [-Wunused-parameter]
       virtual const char  *GetTitle(bool UNUSED(replaceNewlines) = true) const { return "";}
                                                                    ^
[  1%] Building CXX object libavogadro/src/colors/CMakeFiles/elementcolor.dir/moc_elementcolor.cxx.o
[  1%] Linking CXX static library elementcolor.a
[  1%] Built target elementcolor
[  1%] Generating ui_bsdysettingswidget.h
[  1%] Generating moc_bsdyengine.cxx
Scanning dependencies of target bsdyengine
[  1%] Building CXX object libavogadro/src/engines/CMakeFiles/bsdyengine.dir/bsdyengine.cpp.o
In file included from /usr/local/include/openbabel-2.0/openbabel/atom.h:33:0,
                 from /usr/local/include/openbabel-2.0/openbabel/mol.h:42,
                 from /home/surya/avogadro-master/libavogadro/src/engines/bsdyengine.cpp:39:
/usr/local/include/openbabel-2.0/openbabel/base.h:287:68: warning: unused parameter ‘replaceNewlines’ [-Wunused-parameter]
       virtual const char  *GetTitle(bool UNUSED(replaceNewlines) = true) const { return "";}
                                                                    ^
[  1%] Building CXX object libavogadro/src/engines/CMakeFiles/bsdyengine.dir/moc_bsdyengine.cxx.o
In file included from /home/surya/avogadro-master/build/libavogadro/include/avogadro/primitivelist.h:29:0,
                 from /home/surya/avogadro-master/build/libavogadro/include/avogadro/engine.h:37,
                 from /home/surya/avogadro-master/build/libavogadro/src/engines/../../../../libavogadro/src/engines/bsdyengine.h:29,
                 from /home/surya/avogadro-master/build/libavogadro/src/engines/moc_bsdyengine.cxx:9:
/home/surya/avogadro-master/build/libavogadro/include/avogadro/primitive.h:42:23: warning: ‘Avogadro::FALSE_ID’ defined but not used [-Wunused-variable]
   const unsigned long FALSE_ID = std::numeric_limits<unsigned long>::max();
                       ^
[  1%] Linking CXX static library bsdyengine.a
[  1%] Built target bsdyengine
[  1%] Generating qrc_navigatetool.cxx
[  1%] Generating moc_navigatetool.cxx
[  1%] Generating ui_navigatesettingswidget.h
Scanning dependencies of target navigatetool
[  2%] Building CXX object libavogadro/src/tools/CMakeFiles/navigatetool.dir/navigatetool.cpp.o
[  2%] Building CXX object libavogadro/src/tools/CMakeFiles/navigatetool.dir/eyecandy.cpp.o
In file included from /home/surya/avogadro-master/build/libavogadro/include/avogadro/painter.h:33:0,
                 from /home/surya/avogadro-master/libavogadro/src/tools/eyecandy.cpp:30:
/home/surya/avogadro-master/build/libavogadro/include/avogadro/primitive.h:42:23: warning: ‘Avogadro::FALSE_ID’ defined but not used [-Wunused-variable]
   const unsigned long FALSE_ID = std::numeric_limits<unsigned long>::max();
                       ^
[  2%] Building CXX object libavogadro/src/tools/CMakeFiles/navigatetool.dir/moc_navigatetool.cxx.o
[  2%] Building CXX object libavogadro/src/tools/CMakeFiles/navigatetool.dir/qrc_navigatetool.cxx.o
[  2%] Linking CXX static library navigatetool.a
[  2%] Built target navigatetool
[  2%] Generating libavogadro_sv.qm
lconvert: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/lconvert': No such file or directory
libavogadro/src/CMakeFiles/avogadro.dir/build.make:486: recipe for target 'libavogadro/src/libavogadro_sv.qm' failed
make[2]: *** [libavogadro/src/libavogadro_sv.qm] Error 1
CMakeFiles/Makefile2:148: recipe for target 'libavogadro/src/CMakeFiles/avogadro.dir/all' failed
make[1]: *** [libavogadro/src/CMakeFiles/avogadro.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

答案1

你可以参见此答案的修订版本确认 1.2 版本无法在 Ubuntu 16.04 LTS 上编译,因为 OpenBabel 功能和相关依赖项存在问题。

所以我们考虑使用schroot机制。它将在您现有的 16.04 LTS 系统内创建小型 18.04 LTS 系统。两者都将使用相同的文件系统。

要进行设置,schroot您需要执行以下命令(只需复制并粘贴它们):

sudo apt-get install schroot debootstrap -y

cat <<EOF | sudo tee /etc/schroot/chroot.d/bionic.conf
[bionic]
description=Ubuntu 18.04
directory=/srv/chroot/bionic
root-users=$USER
type=directory
users=$USER
EOF

sudo mkdir -p /srv/chroot/bionic
sudo debootstrap bionic /srv/chroot/bionic

cat <<EOF | sudo tee /srv/chroot/bionic/etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
EOF

schroot -c bionic -u root apt-get update
schroot -c bionic -u root apt-get install avogadro

要从终端运行 Avogardo 1.2,您需要运行:

schroot -c bionic env DISPLAY=:0.0 avogadro

您可以选择Avogadro.desktop为其创建文件并将其放在桌面上:

cat <<EOF > ~/Desktop/Avogadro.desktop
[Desktop Entry]
Version=1.2
Name=Avogadro
GenericName=Advanced molecular editor
Comment=Molecular Graphics and Modelling System
Exec=schroot -c bionic env DISPLAY=:0.0 avogadro
Icon=/srv/chroot/bionic/usr/share/pixmaps/avogadro-icon.png
Terminal=false
Type=Application
Categories=Qt;Science;Chemistry;Physics;Education;
StartupNotify=true
MimeType=chemical/x-cif;chemical/x-cml;chemical/x-daylight-smiles;chemical/x-gamess-input;chemical/x-gamess-output;chemical/x-gaussian-log;chemical/x-mopac-out;chemical/x-pdb;chemical/x-xyz;chemical/x-gaussian-checkpoint;chemical/x-gaussian-cube;chemical/x-qchem-output;
EOF

chmod +x ~/Desktop/Avogadro.desktop

并享受应用程序:

16.04 LTS 上的 Avogadro 1.2

答案2

walt@bat:~(1)$ apt-cache search lconvert
libv4l-0 - Collection of video4linux support libraries
libv4l-dev - Collection of video4linux support libraries (development files)
libv4lconvert0 - Video4linux frame format conversion library
qt4-dev-tools - Qt 4 development tools
addresses-goodies-for-gnustep - Personal Address Manager for GNUstep (Goodies)
walt@bat:~(0)$ 

您需要安装其中一些软件包吗?

相关内容