无法安装 pymol,因为我无法安装 libfreetype6-dev

无法安装 pymol,因为我无法安装 libfreetype6-dev

我正在关注此链接http://www.pymolwiki.org/index.php/User:Tlinnet/Linux_Install安装 pymol。我需要 libfreetype6-dev 作为依赖项,但无法安装。

fmp@eva03:~/Bins$ sudo apt-get install libfreetype6-dev 
[sudo] password for fmp: 
Reading package lists... Done 
Building dependency tree Reading state information... Done 
The following packages were automatically installed and are no longer required:
 linux-headers-4.2.0-23 linux-headers-4.2.0-23-generic linux-image-4.2.0-23-generic linux-image-extra-4.2.0-23-generic 
Use 'apt-get autoremove' to remove them. 
The following NEW packages will be installed: libfreetype6-dev 
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 
Need to get 0 B/630 kB of archives. 
After this operation, 3 672 kB of additional disk space will be used. 
(Reading database ... 252267 files and directories currently installed.) 
Preparing to unpack .../libfreetype6-dev_2.5.2-4ubuntu2_amd64.deb ... 
Unpacking libfreetype6-dev:amd64 (2.5.2-4ubuntu2) ... 
dpkg: error processing archive /var/cache/apt/archives/libfreetype6-dev_2.5.2-4ubuntu2_amd64.deb (--unpack): 
trying to overwrite shared '/usr/share/man/man1/freetype-config.1.gz', which is different from other instances of package libfreetype6-dev:amd64 
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) 
Processing triggers for man-db (2.7.4-1) ... 
Errors were encountered while processing: /var/cache/apt/archives/libfreetype6-dev_2.5.2-4ubuntu2_amd64.deb 
E: Sub-process /usr/bin/dpkg returned an error code (1)

以下是尝试安装 pymol 的最后一行

In file included from /usr/include/freetype2/ft2build.h:37:0,
                 from layer1/TypeFace.cpp:25:
/usr/include/freetype2/config/ftheader.h:3:58: fatal error: x86_64-linux-gnu/freetype2/config/ftheader.h: 
No such file or directory
     compilation terminated.
     c++ -pthread -std=c++0x -fPIC -D_PYMOL_LIBPNG -D_PYMOL_INLINE -D_PYMOL_VMD_PLUGINS -D_HAVE_LIBXML -D_PYMOL_FREETYPE -DNO_MMLIBS -D_PYMOL_NUMPY -Iov/src -Ilayer0 -Ilayer1 -Ilayer2 -Ilayer3 -Ilayer4 -Ilayer5 -Imodules/cealign/src -Ibuild/generated -Icontrib/uiuc/plugins/include -Icontrib/uiuc/plugins/molfile_plugin/src -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include -I/usr/include/freetype2 -I/usr/include/libxml2 -I/usr/include/python2.7 -c layer1/Character.cpp -o build/temp.linux-x86_64-2.7/layer1/Character.o -Wno-write-strings
 -Wno-unused-function -Wno-char-subscripts -ffast-math -funroll-loops -O3 -fcommon
     error: command 'c++' failed with exit status 1

答案1

选项一

如果您不需要 1.8 版本,并且您正在使用 Ubuntu 14.04 或更新版本,则可以通过官方 Ubuntu 存储库安装 1.7 版本。只需运行以下命令即可安装pymol版本和pymol依赖项:

sudo apt-get update
sudo apt-get install pymol

如果仍然抱怨libfreetype6-dev,请运行以下命令来修复它,然后再次运行上述命令。

sudo apt-get clean
sudo apt-get update
sudo apt-get purge libfreetype6-dev

要通过 apt-get 搜索可用的软件包,请运行以下命令,如本例所示:

apt-cache search pymol

要将结果缩小到包含特定单词的结果,请使用grep如下示例:

apt-cache search pymol | grep pymol

列出可用版本:

apt-cache show pymol | grep "Version:"

列出更多信息:

apt-cache show pymol

方案二

或者,如果您坚持安装下载的版本,请运行以下命令进行安装libfreetype6-dev

sudo apt-get clean
sudo apt-get update
sudo mv /usr/share/man/man1/freetype-config.1.gz ~/
sudo apt-get install libfreetype6-dev

这会将manpage文件移动到您的主目录,因此您必须从那里查看该文件,而不是使用manpage

相关内容