在 ubuntu 上安装 spectrum3d

在 ubuntu 上安装 spectrum3d

我想为 Ubuntu 安装一个光谱分析工具,并且想到Spectrum3d看起来不错。

我尝试过安装说明据我了解,我应该写:

sudo add-apt-repository ppa:nadaeck/spectrum3d

在终端中。它不起作用。我收到以下错误消息:

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 128, in <module>
    ppa_info = get_ppa_info_from_lp(user, ppa_name)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py", line 84, in get_ppa_info_from_lp
curl.perform()
pycurl.error: (7, "couldn't connect to host")

从我对 Linux 的初步了解来看,我应该可以在这里输入我的 sudo 密码,但我写的字符是以明文显示的。它从不要求我输入密码

当这不起作用时,我尝试从 sourceforge 下载它并编译它,我也尝试在 Ubuntu 软件中心搜索它,但我找不到它。

我下载了最新版本并进入文件夹并输入:

./configure; make; make install

我得到了以下输出:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GTK3... no
checking for GTK2... no
configure: error: GTK library (libgtk-2.0 or libgtk-3.0) is required
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.

那么,如何在我的系统上启动并运行该程序?

答案1

该 PPA 太旧,没有适用于 13.10 及更新版本的软件包,因此您需要编译源代码。您需要一些标头和工具来构建软件:

sudo apt-get install aptitude
sudo aptitude install build-essential libgtk-3-dev libgstreamer0.10-dev libsdl1.2-dev

完成后,您可以./configure照常运行和构建您的包:

./configure
[...]
config.status: executing depfiles commands

configure: If you want to use gtkglext, its version should match the gtk version (gtkglext-1.0 for gtk-2.0, gtkglext-3.0 for gtk-3.0)

configure:      ******************************************
configure:      *  Gstreamer version ...............1.0  *
configure:      *  GTK version .................GTK-3.0  *
configure:      *  OpenGL support...................SDL  *
configure:      *  JACK support......................NO  *
configure:      *  MULTITOUCH support................NO  *
configure:      ******************************************

剩下的就是make && make install。我强烈建议你构建一个 debian 包,这样你就可以轻松升级/删除。

相关内容