![我无法在 Ubuntu 下安装 Sleepyhead](https://linux22.com/image/1100994/%E6%88%91%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%20%E4%B8%8B%E5%AE%89%E8%A3%85%20Sleepyhead.png)
我正在尝试按照教程安装 Sleepyhead
http://ubuntuforums.org/showthread.php?p=11756055#post11756055
但我无法编译源代码
horacio@horacio-ThinkPad-X201:~/sleepyhead$ make
cd sleepyhead/ && make -f Makefile
make[1]: se ingresa al directorio «/etc/home/horacio/sleepyhead/sleepyhead»
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DGIT_BRANCH=\"master\" -DGIT_REVISION=\"3b53d93\" -D_TTY_POSIX_ -DQT_NO_DEBUG -DQT_WEBKIT_LIB -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtWebKit -I/usr/include/qt4 -I/usr/local/include -I/usr/include -I/usr/X11R6/include -I. -I. -o main.o main.cpp
In file included from mainwindow.h:19:0,
from main.cpp:24:
oximetry.h:17:28: fatal error: qextserialport.h: No existe el archivo o el directorio
#include <qextserialport.h>
^
compilation terminated.
make[1]: *** [main.o] Error 1
make[1]: se sale del directorio «/etc/home/horacio/sleepyhead/sleepyhead»
make: *** [sub-sleepyhead-make_default-ordered] Error 2
horacio@horacio-ThinkPad-X201:~/sleepyhead
提前致谢
答案1
我在 ubuntu 14.10 下做了什么
sudo apt-get install build-essential
sudo apt-get install git-core qt4-dev-tools libqt4-opengl-dev libqtwebkit-dev zlib1g-dev
sudo apt-get install libqt5serialport5 libqt5serialport5-dev
sudo apt-get install libqt5webkit5-dev
git clone git://sleepyhead.git.sourceforge.net/gitroot/sleepyhead/sleepyhead
cd sleepyhead
export QT_SELECT=qt5
qmake
make -j3
希望有帮助
答案2
几个月前我成功编译了 sleepyhead,所以我不记得所有的步骤了。我的系统上安装了 qextserialport 包。如果我是你,我会加载该包,看看是否能改变一切。sleepyhead 包需要修复,但可能还有更重要的事情要做……
答案3
有帮助的是:
创建到 /usr/include/qt4/QtExtSerialPort 的链接
sudo ln -s /usr/include/QtExtSerialPort /usr/include/qt4/QtExtSerialPort
如果缺少 qazip.h,请安装 libquazip0-dev
sudo apt-get install libquazip0-dev
问候托马斯
答案4
我在使用 qt5(我的 ubuntu 13.10 上的默认版本)构建 SleepyHead 时遇到了麻烦,但能够通过一次代码更改和上面提到的软链接使用 qt4 成功构建它。以下是步骤。
注意:这是在 Ubuntu 13.10 上
apt-get install git qt4-dev-tools libqt4-opengl-dev libquazip0-dev libqextserialport-dev libqextserialport1
sudo ln -s /usr/include/QtExtSerialPort /usr/include/qt4/QtExtSerialPort
git clone git://sleepyhead.git.sourceforge.net/gitroot/sleepyhead/sleepyhead
cd sleepyhead
edit sleepyhead/newprofile.h and add a line "#include <QUrl>" and save. Now do a qmake-qt4 followed by make
qmake-qt4
make