When compiling my C++ project that includes uuid.h I get the compile error:
fatal error: uuid.h: No such file or directory
I’m not sure whats going wrong. It could be my compiler instructions are wrong or that I indeed dont have that file installed (but I don’t think thats the problem).
sudo apt-get install uuid-dev
The above command outputs: uuid-dev is already the newest version
My makefile is simply this:
all:
g++ -o bin/myapplication src/main.cpp -std=c++11
Edit:
In .h file:
#include <uuid.h>
Any ideas what the issue could be?
asked May 11, 2016 at 2:59
sazrsazr
24.4k65 gold badges190 silver badges348 bronze badges
2
The package’s file list shows that it contains /usr/include/uuid/uuid.h. Since your default include path looks for files relative to /usr/include, you’d need to either write <uuid/uuid.h>, or add -I/usr/include/uuid to your compile options.
However, the package also provides a .pc file for use with pkg-config, which is meant to abstract the details of which compiler options you need to build a program against a library. If you run pkg-config --cflags uuid you get get the output -I/usr/include/uuid, and if you run pkg-config --libs uuid, you get the output -luuid. These are meant to be incorporated into your program’s build.
Since it looks like you’re using Make, you should add these lines to your Makefile:
CFLAGS += `pkg-config --cflags uuid`
LDFLAGS += `pkg-config --libs uuid`
That’ll incoroporate the necessary -I and -l options into your compile commands automatically — and it’ll also work on other systems where the UUID library might be installed in a different location.
answered May 11, 2016 at 3:12
WyzardWyzard
33.5k3 gold badges66 silver badges86 bronze badges
I bielive in newer version of the uuid the header is <uuid/uuid.h>
answered May 11, 2016 at 3:05
Содержание
- fatal error: uuid/uuid.h: No such file or directory (dockcross/linux-arm64:latest) #441
- Comments
- fatal error: ‘uuid/uuid.h’ file not found #19
- Comments
- Русские Блоги
- fatal error: uuid/uuid.h: No such file or directory
- Решение
- ссылка на сайт
- Реализация UUID
- Интеллектуальная рекомендация
- Платформа Hybris E-Commerce Platform Service Практика
- Метод даты JS.
- Расчетная схема мультиплексной пересылки RTSP / RTMP на основе шифрования AES
- Инициализация сеанса ненормальная проблема в рамках web.py
- FAQ по программному обеспечению MD sp1
- make fails on missing linux/uuid.h #560
- Comments
- uname -r
- rpm -qif /usr/include/uuid/uuid.h
- Thread: /usr/include/uuid/uuid.h is missing
- /usr/include/uuid/uuid.h is missing
- Re: /usr/include/uuid/uuid.h is missing
- Re: /usr/include/uuid/uuid.h is missing
fatal error: uuid/uuid.h: No such file or directory (dockcross/linux-arm64:latest) #441
compilation terminated. [root:/] 1 # apt-get install uuid-dev Reading package lists. Done Building dependency tree Reading state information. Done uuid-dev is already the newest version (2.29.2-1+deb9u1). 0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded. [root:/] # env GREP_COLOR=01;32 LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: ARCH=arm64 DEFAULT_DOCKCROSS_IMAGE=dockcross/linux-arm64:latest CROSS_TRIPLE=aarch64-unknown-linux-gnueabi LESS= -iJr HOSTNAME=d86572754d32 XCC_PREFIX=/usr/xcc QEMU_SET_ENV=LD_LIBRARY_PATH=/usr/xcc/aarch64-unknown-linux-gnueabi/lib:/usr/xcc/aarch64-unknown-linux-gnueabi/aarch64-unknown-linux-gnueabi/sysroot CC=/usr/xcc/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-gcc PWD=/ HOME=/root AS=/usr/xcc/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-as AR=/usr/xcc/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ar FC=/usr/xcc/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-gfortran VCPKG_FORCE_SYSTEM_BINARIES=1 CXX=/usr/xcc/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-g++ TERM=xterm UUID_HOME=/usr/include SHLVL=1 CROSS_ROOT=/usr/xcc/aarch64-unknown-linux-gnueabi CROSS_COMPILE=aarch64-unknown-linux-gnueabi- QEMU_LD_PREFIX=/usr/xcc/aarch64-unknown-linux-gnueabi/aarch64-unknown-linux-gnueabi/sysroot PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/xcc/aarch64-unknown-linux-gnueabi/bin PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig HISTSIZE=3000 CMAKE_TOOLCHAIN_FILE=/usr/xcc/aarch64-unknown-linux-gnueabi/Toolchain.cmake CPP=/usr/xcc/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-cpp LD=/usr/xcc/aarch64-unknown-linux-gnueabi/bin/aarch64-unknown-linux-gnueabi-ld _=/usr/bin/env OLDPWD=/work»>
The text was updated successfully, but these errors were encountered:
Источник
fatal error: ‘uuid/uuid.h’ file not found #19
Any idea what could cause this?
I have been unable to find anything about it anywhere.
The text was updated successfully, but these errors were encountered:
The suggested solution was to apt-get install uuid-dev , but I am not sure how to include that in the buildback.
You can install any packages you one in the pre_compile hook. You can place a script in bin/pre_compile inside your repository and the buildpack will execute it before compiling your sources.
The problem is with compiling your LinuxBridge dependency and doesn’t seem to be any problem with the build pack itself. I’d reach out to the maintainers of that library regarding how to use this dependency. You may need to ensure that any of its dependencies are installed such as via the pre_compile hook.
I’ve run into the same issue trying to get my application to build which relies on https://github.com/PerfectlySoft/Perfect-Crypto. using the pre_compile script that @kylef recommended above, I get the following out:
Here are the contents of the bin/pre_compile :
I’ve also tried sudo apt-get install uuid-dev and I receive the same errors in the build log.
Note: According to Heroku, the cedar-14 stack is supposed to include libssl-dev (https://devcenter.heroku.com/articles/stack-packages) — this is the only package that Perfect-Crypto claims as being needed in its README.
Any suggestions on a workaround?
@gtchance did you find any workaround for this?
I use Ubuntu 17.10 and had the same issue.
The sudo apt-get install uuid-dev helped. But then I had other dependencies problems like this
The final command that I would recommend is this:
sudo apt-get install xsltproc docbook-xsl uuid-dev
for RHEL
yum install libuuid libuuid-devel
remote: In file included from /tmp/build_76fc57fa28a1232e00a22b4592e0f911/.build/checkouts/Perfect-LinuxBridge/Sources/LinuxBridge/LinuxBridge.c:2:
remote: /tmp/build_76fc57fa28a1232e00a22b4592e0f911/.build/checkouts/Perfect-LinuxBridge/Sources/LinuxBridge/include/LinuxBridge.h:6:10: fatal error: ‘uuid/uuid.h’ file not found
remote: #include
remote: ^
remote: 1 error generated.
remote: [4/21] Compiling LinuxBridge LinuxBridge.c
remote: [5/21] Compiling c-atomics.c
remote: ! Push rejected, failed to compile Swift app.
Ensure to run a
apt-get update
before
apt-get install uuid-dev
The suggested solution was to apt-get install uuid-dev , but I am not sure how to include that in the buildback.
Источник
Русские Блоги
fatal error: uuid/uuid.h: No such file or directory
Когда мы используем C / C ++ для генерации UUID в системе Linux, мы обычно используем функции uuid_generate в UUID / uuid.h для генерации UUID / uuid. Каталог «
Решение
ссылка на сайт
Когда вы компилируете ссылку, добавьте параметры -LUUID
Реализация UUID
UUID Реализация, пожалуйста, обратитесь к моей дополнительной статьеC / C ++ генерирует UUID
Интеллектуальная рекомендация
Платформа Hybris E-Commerce Platform Service Практика
Диаграммы поиска платформы электронной коммерции С быстрым развитием платформы электронной коммерции и количеству продаж товаров становится более сложным из большого количества товаров в большом колич.
Метод даты JS.
содержание Дата JavaScript Дата JavaScript.
Расчетная схема мультиплексной пересылки RTSP / RTMP на основе шифрования AES
Многие разработчики недавно консультировались с нами. За исключением того, что аудио- и видеоданные, собранные и закодированные с помощью нашего push-терминала Windows, могут быть зашифрованы, что, ес.
Инициализация сеанса ненормальная проблема в рамках web.py
При определении сеанса настройка начального значения используется для использования инициализатора, например, как Здесь я хочу сохранить два ключа в сеансе для входа в систему и имени, и инициализиров.
FAQ по программному обеспечению MD sp1
FAQ по программному обеспечению MD sp1 Сущность №:40 С форума: Липкие медведи онлайн «MD / MP3 / Walkman Forum» Описание содержания: 1. Мой компьютер не распознает NETMD! Что делать? .
Источник
make fails on missing linux/uuid.h #560
line 20 of linux/nvme.h includes
which is missing from the linux/ dir. Commenting this line allows make to finish without error.
The text was updated successfully, but these errors were encountered:
I met the similar issue. CentOS release 6.5 (Final) + nvme-cli-1.9
[root@localhost nvme-cli]# make
cc -D_GNU_SOURCE -D__CHECK_ENDIAN__ -O2 -g -Wall -Werror -std=gnu99 -DLIBUUID -DNVME_VERSION=’»1.4.dirty»‘ -c nvme.c
In file included from nvme-print.h:4,
from nvme.c:48:
nvme.h:27:23: error: uuid/uuid.h: No such file or directory
In file included from nvme.h:34,
from nvme-print.h:4,
from nvme.c:48:
linux/nvme.h:19:24: error: linux/uuid.h: No such file or directory
In file included from nvme.h:34,
from nvme-print.h:4,
from nvme.c:48:
linux/nvme.h:960: error: expected specifier-qualifier-list before ‘uuid_t’
nvme.c: In function ‘gen_hostnqn_cmd’:
nvme.c:3236: error: ‘uuid_t’ undeclared (first use in this function)
nvme.c:3236: error: (Each undeclared identifier is reported only once
nvme.c:3236: error: for each function it appears in.)
nvme.c:3236: error: expected ‘;’ before ‘uuid’
cc1: warnings being treated as errors
nvme.c:3239: error: implicit declaration of function ‘uuid_generate_random’
nvme.c:3239: error: ‘uuid’ undeclared (first use in this function)
nvme.c:3240: error: implicit declaration of function ‘uuid_unparse_lower’
make: *** [nvme.o] Error 1
If I execute yum install uuid uuid-devel:
Package uuid-1.6.1-10.el6.x86_64 already installed and latest version
Package uuid-devel-1.6.1-10.el6.x86_64 already installed and latest version
Nothing to do
I think libuuid is the package for this, not uuid or uuid-devel (at least that’s the case on fedora).
Also resolves when I use the direct path on sles11sp4 and sles12sp2 «/usr/include/uuid/uuid.h» as shown below. I had to remove the endif:
/* #include
*/
#include
locate uuid.h
/usr/include/uuid/uuid.h
uname -r
rpm -qif /usr/include/uuid/uuid.h
Name : libuuid-devel Relocations: (not relocatable)
Version : 2.19.1 Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release : 6.72.1 Build Date: Tue Jun 9 00:52:40 2015
Install Date: Wed Dec 13 11:49:11 2017 Build Host: sheep03
Group : System/Base Source RPM: util-linux-2.19.1-6.72.1.src.rpm
Size : 17085 License: BSD 3-Clause; GPL v2 or later
Signature : RSA/8, Tue Jun 9 00:52:59 2015, Key ID e3a5c360307e3d54
Packager : http://bugs.opensuse.org
URL : http://userweb.kernel.org/
kzak/util-linux-ng/
Summary : A collection of basic system utilities
Description :
This package contains a large variety of low-level system utilities
that are necessary for a Linux system to function. It contains the
mount program, the fdisk configuration tool, and more.
Источник
Thread: /usr/include/uuid/uuid.h is missing
Thread Tools
Display
/usr/include/uuid/uuid.h is missing
The file uuid/uuid.h is needed by a program I’m trying to compile (because there is no Ubuntu package for it). I searched for that here and found one thread from 2007 that suggested it was part of the e2fsprogs package:
In Slackware, /usr/include/uuid/uuid.h is part of e2fsprogs there, too. But in Ubuntu 9.10, e2fsprogs does not have that file at all.
So where did it go? How do I get it? Knowing what it is, I know it should be important to a few programs. Is it in some other package, now?
Re: /usr/include/uuid/uuid.h is missing
You need to install a development/header package. In Ubuntu, this package is called uuid-dev.
Re: /usr/include/uuid/uuid.h is missing
Thanks, that got it!
I guess what I need now is a list of what files are provided in all Ubuntu packages . without having to actually install every one of them and run «dpkg -L» or some equivalent on each .deb file (and avoid having do download them all). I’ll ask in another thread when I figure out which section is appropriate for that. I’m wanting to create a correlation index between various distributions that show the relationship of «what package do I install in distribution X to get all the stuff from package Y in distribution Z».
Источник
- centos
- uuid
Как я могу исправить ошибку «uuid / uuid.h — Нет такого файла» в CentOS
SyncMaster
2017-02-06 в 20:12
Я использую CentOS 7 (64 бит). Я пытаюсь построить проект, и я получаю эту ошибку.
fatal error: uuid/uuid.h: No such file or directory #include <uuid/uuid.h> ^ compilation terminated. make: *** [all] Error 1
Это связано с отсутствующим пакетом? Я уже установил uuid-devel. Какой пакет я должен установить, чтобы решить эту проблему? Спасибо!
Я скучал по тому же, пытаясь скомпилировать Syslinux для aarch64.
Dan 5 лет назад
0
1 ответ на вопрос
SyncMaster
2017-02-06 в 21:05
Установка пакета разработки libuuid-devel, как предложено здесь, исправила проблему.
sudo yum install libuuid libuuid-devel
Это `libuuid-devel`, а не` libuuid-devl`
fpmurphy1 5 лет назад
0
как насчет старых Centos 5?
confiq 5 лет назад
0
Предлагаемое решение работает; дорогой ОП, пожалуйста, отметьте его как «принятый» или объясните, почему вы еще этого не сделали.
ralien 4 года назад
0
Похожие вопросы
-
4
Как установить рабочий стол GNOME на Linux (CENTOS)
-
2
Подключение MIDI-контроллера к CentOS5
-
2
Ищем / ждем домен бесконечно
-
-
1
Поддержка CentOS и / dev / midi
-
2
CentOS Двойной экран не работает
-
3
CentOS — разница между ssh -X и startx и запуском графического интерфейса
-
3
Как работает X11?
-
1
Gparted предупреждение: невозможно найти точку монтирования
-
4
Проверка версии PHP, на которой я работаю в Linux?
-
5
CentOS стрелка вверх предыдущая команда
Bug 1737603
— stats.c:113:10: fatal error: uuid/uuid.h: No such file or directory
Summary:
stats.c:113:10: fatal error: uuid/uuid.h: No such file or directory
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
