手动安装Qucs会显示Qt标头错误
rajath@Rajathkumar:~$ cd Downloads rajath@Rajathkumar:~/Downloads$ cd qucs-0.0.16 rajath@Rajathkumar:~/Downloads/qucs-0.0.16$ ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu 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 whether to enable maintainer-specific portions of Makefiles... no checking for g++... g++ 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 g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking for gcc... gcc 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 dependency style of gcc... gcc3 checking for ranlib... ranlib checking for ar... ar checking for lrelease-qt3... no checking for lrelease... /usr/bin/lrelease checking for lupdate-qt3... no checking for lupdate... /usr/bin/lupdate checking for moc-qt3... no checking for moc... /usr/bin/moc checking for uic-qt3... no checking for uic... /usr/bin/uic checking how to run the C preprocessor... gcc -E checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... no checking for Qt headers... configure: error: not found
apt-cache search libqt | grep headers
apt-cache search libqt | grep headers
返回
libqt3-compat-headers - Qt 1.x and 2.x compatibility includes libqt3-headers - Qt3 header files libqtgstreamer-dev - Development headers for QtGStreamer
这是如何搜索您没有的依赖项的基本示例。 另请参阅http://ubuntuforums.org/showthread.php?t=124483第8条,以获得更全面的解释。
看起来你想要抓住第二个并安装它。 如果您不知道如何: sudo apt-get install libqt3-headers
将会解决问题。
至少对我而言,它已经成功了
sudo apt-get install build-essential libqt4-dev libqt4-qt3support automake libtool gperf flex bison git cmake
来自https://github.com/Qucs/qucs/wiki/Build-Linux
继续
./configure make sudo make install
当你成功完成./configure
和make
时, componentdialog.moc.cpp
或many ~~~.moc.cpp
文件似乎是由/use/bin/moc-qt4
自动创建的。
您没有在源文件中看到它们。 所以你需要安装一些qt4二进制包。 我在使用puppy-linux,所以安装了qt_all-4.7.3.sfs
但有了它,我不能编译SUCS,所以卸载它们。 然而,我从以前的qt安装中得到了/usr/bin/moc-qt4
。
您使用命令将QUCS的源文件解压缩到“某处”:
tar -xvzf qucs-0.0.18.131128.tar.gz
(0.0.18.131128)是我的包的版本号。 我们称之为“某处”作为SRC-DIR。
要编译Qucs,您需要安装:
-
libqt3-compat-headers_3.deb
-
libqt3-headers_3.deb
-
libqt4-dev_4.deb
转到filewatcher.com并在搜索框中输入这些文件名,然后逐个按搜索按钮找到它们以下载并安装它们。
安装后:
-
libqt4-dev_4.deb
将位于/usr/include/qt4
。 -
libqt3-compat-headers_3.deb
和libqt3-headers_3.deb
将位于/usr/include/qt3
。
你需要做一个符号链接到/usr/include/qt4
,名称为“Qt”为/usr/include/~Q
t,因为Qucs configure
文件似乎在寻找目录/usr/include/Qt
而不是/usr/include/qt4
或qy3
与下一个命令:
ln -s /usr/include/qt4 /usr/include/Qt (Enter) to make the sim-link /usr/include/~Qt.
我们差不多要做./configure
但是/usr/include/qt4
(~QT)目录中似乎有些混乱。
许多头文件都不在正确的位置。 因为它需要这么多,你可以使用以下命令将/usr/include/qt4/*.h
所有.h
文件复制到/usr/include/qt4/*.h
:cp / usr / include /qt4/Qt/*.h / usr / include / qt4
并使用以下命令在/usr/include
链接到/usr/include/qt4/QtGui
:
ln -s /usr/include/qt4/QtGui /usr/include/QtGui
您还需要将以下列出的文件从/usr/include/qt4/Qt3Support
和/usr/include/qt4/QtCore
目录/usr/include/qt4/Qt3Support
到/usr/include/qt4/QtCore
目录。
- Q3Dict(来自
/Qt3Support
),cp /usr/include/qt4/Qt3Support/Q3Dict /usr/include/qt4
- Q3GridLayout(来自
/Qt3Support
),cp /usr/include/qt4/Qt3Support/Q3GridLayout /usr/include/qt4
- Q3PtrList(来自
/Qt3Support
),cp /usr/include/qt4/Qt3Support/Q3PtrList /usr/include/qt4
- Q3ScrollView(来自
/Qt3Support
),cp /usr/include/qt4/Qt3Support/Q3ScrollView /usr/include/qt4
- Q3TextSream(来自
/Qt3Support
),cp /usr/include/qt4/Qt3Support/Q3TextStream /usr/include/qt4
- Q3VBoxLayout(来自
/Qt3Support
),cp /usr/include/qt4/Qt3Support/Q3VBoxLayout /usr/include/qt4
- QProcess(来自
/QtCore
),cp /usr/include/qt4/QtCore/QProcess /usr/include/qt4
-
QSettings(来自
/QtCore
),cp /usr/include/qt4/QtCore/QSettings /usr/include/qt4
-
这些文件是
/usr/include/qt4
(~Qt)中许多.h
文件的链接。 如果你使用mc,你可以很容易地做到这些吗?
您还需要将/usr/include/qt3/private
目录及其内容复制到/usr/include/qt4
作为/usr/include/qt4/private
。
使用命令:
mkdir /usr/include/qt4/private cp /usr/include/qt3/private/* /usr/include/qt4/private
现在,您可以在SRC-DIR ./configure
。 我希望它能成功完成冗长的配置。
如果你现在这样make
这将使你几乎一路编译Qucs,但它可以停在:
/usr/bin/ld: cannot find -lQtCore /usr/bin/ld: cannot find -lQtGui /usr/bin/ld: cannot find -lQtXml /usr/bin/ld: cannot find -lQt3Support /usr/bin/ld: cannot find -lQtSvg collect2: ld returned 1 exit status make[3]: *** [qucs] Error 1 make[3]: Leaving directory `/root/SRC/qucs-0.0.18.131128/qucs' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/SRC/qucs-0.0.18.131128/qucs' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/SRC/qucs-0.0.18.131128' make: *** [all] Error 2
如果您没有安装任何libqt4
软件包。 这发生在我身上,因为我还没有安装libqt4
包。 我会找到要安装的软件包,如果成功编译Sucs,我会发布我做的。