• Home »
  • Errors »
  • RPMBuild Error: error: Installed (but unpackaged) file(s) found

RPMBuild Error: error: Installed (but unpackaged) file(s) found

It has been a long time since I built an RPM using a packages source so I had to brush up on my knowledge there before attempting to build an RPM package for CentOS today from curl’s source. In the process of building the curl RPM package for CentOS I received an error from rpmbuild stating that there was a rather large list of files that were unpackaged. Below I describe the rpmbuild unpackaged error along with a way to resolve the problem. I would love to hear any feedback people have on RPM building since it is not something I do on a regular basis my knowledge is limited.

The below shows the last output from attempting to build a curl RPM package on CentOS Linux from the source provided on the curl download page here.

CentOS rpmbuild Error: Installed (but unpackaged) file(s) found

bash

  1. RPM build errors:
  2.     Installed (but unpackaged) file(s) found:
  3.    /usr/bin/curl-config
  4.    /usr/include/curl/curl.h
  5.    /usr/include/curl/curlbuild.h
  6.    /usr/include/curl/curlrules.h
  7.    /usr/include/curl/curlver.h
  8.    /usr/include/curl/easy.h
  9.    /usr/include/curl/mprintf.h
  10.    /usr/include/curl/multi.h
  11.    /usr/include/curl/stdcheaders.h
  12.    /usr/include/curl/typecheck-gcc.h
  13.    /usr/include/curl/types.h
  14.    /usr/lib/libcurl.a
  15.    /usr/lib/libcurl.la
  16.    /usr/lib/libcurl.so
  17.    /usr/lib/libcurl.so.4
  18.    /usr/lib/libcurl.so.4.2.0
  19.    /usr/lib/pkgconfig/libcurl.pc
  20.    /usr/share/man/man1/curl-config.1.gz
  21.    /usr/share/man/man3/curl_easy_cleanup.3.gz
  22.    /usr/share/man/man3/curl_easy_duphandle.3.gz
  23.    /usr/share/man/man3/curl_easy_escape.3.gz
  24.    /usr/share/man/man3/curl_easy_getinfo.3.gz
  25.    /usr/share/man/man3/curl_easy_init.3.gz
  26.    /usr/share/man/man3/curl_easy_pause.3.gz
  27.    /usr/share/man/man3/curl_easy_perform.3.gz
  28.    /usr/share/man/man3/curl_easy_recv.3.gz
  29.    /usr/share/man/man3/curl_easy_reset.3.gz
  30.    /usr/share/man/man3/curl_easy_send.3.gz
  31.    /usr/share/man/man3/curl_easy_setopt.3.gz
  32.    /usr/share/man/man3/curl_easy_strerror.3.gz
  33.    /usr/share/man/man3/curl_easy_unescape.3.gz
  34.    /usr/share/man/man3/curl_escape.3.gz
  35.    /usr/share/man/man3/curl_formadd.3.gz
  36.    /usr/share/man/man3/curl_formfree.3.gz
  37.    /usr/share/man/man3/curl_formget.3.gz
  38.    /usr/share/man/man3/curl_free.3.gz
  39.    /usr/share/man/man3/curl_getdate.3.gz
  40.    /usr/share/man/man3/curl_getenv.3.gz
  41.    /usr/share/man/man3/curl_global_cleanup.3.gz
  42.    /usr/share/man/man3/curl_global_init.3.gz
  43.    /usr/share/man/man3/curl_global_init_mem.3.gz
  44.    /usr/share/man/man3/curl_mprintf.3.gz
  45.    /usr/share/man/man3/curl_multi_add_handle.3.gz
  46.    /usr/share/man/man3/curl_multi_assign.3.gz
  47.    /usr/share/man/man3/curl_multi_cleanup.3.gz
  48.    /usr/share/man/man3/curl_multi_fdset.3.gz
  49.    /usr/share/man/man3/curl_multi_info_read.3.gz
  50.    /usr/share/man/man3/curl_multi_init.3.gz
  51.    /usr/share/man/man3/curl_multi_perform.3.gz
  52.    /usr/share/man/man3/curl_multi_remove_handle.3.gz
  53.    /usr/share/man/man3/curl_multi_setopt.3.gz
  54.    /usr/share/man/man3/curl_multi_socket.3.gz
  55.    /usr/share/man/man3/curl_multi_socket_action.3.gz
  56.    /usr/share/man/man3/curl_multi_strerror.3.gz
  57.    /usr/share/man/man3/curl_multi_timeout.3.gz
  58.    /usr/share/man/man3/curl_share_cleanup.3.gz
  59.    /usr/share/man/man3/curl_share_init.3.gz
  60.    /usr/share/man/man3/curl_share_setopt.3.gz
  61.    /usr/share/man/man3/curl_share_strerror.3.gz
  62.    /usr/share/man/man3/curl_slist_append.3.gz
  63.    /usr/share/man/man3/curl_slist_free_all.3.gz
  64.    /usr/share/man/man3/curl_strequal.3.gz
  65.    /usr/share/man/man3/curl_unescape.3.gz
  66.    /usr/share/man/man3/curl_version.3.gz
  67.    /usr/share/man/man3/curl_version_info.3.gz
  68.    /usr/share/man/man3/libcurl-easy.3.gz
  69.    /usr/share/man/man3/libcurl-errors.3.gz
  70.    /usr/share/man/man3/libcurl-multi.3.gz
  71.    /usr/share/man/man3/libcurl-share.3.gz
  72.    /usr/share/man/man3/libcurl-tutorial.3.gz
  73.    /usr/share/man/man3/libcurl.3.gz

Getting around this rpmbuild error is fairly simple depending on the amount of files that are unpackaged. All you need to do is update your .spec file you are using to build the RPM package. For instance in this case my spec file is named curl.spec and located in the “~/rpmbuild/SPECS/” directory. All I needed to do was copy the above list of files specified in the error and add them to the SPEC file as displayed in the below SPEC file example. Each of these files will need to be underneath the “%files” option in the spec file.

Curl SPEC File Example: Adding Unpackaged Files

bash

  1. # This is a sample spec file for wget
  2.  
  3. %define _topdir         /home/alex/rpmbuild
  4. %define name                    curl
  5. %define release         1
  6. %define version         7.20.0
  7. %define buildroot %{_topdir}/%{name}-%{version}-root
  8.  
  9. BuildRoot:      %{buildroot}
  10. Summary:                GNU wget
  11. License:                GPL
  12. Name:                   %{name}
  13. Version:                %{version}
  14. Release:                %{release}
  15. Source:                 %{name}-%{version}.tar.gz
  16. Prefix:                 /usr
  17. Group:                  Development/Tools
  18.  
  19. %description
  20. curl 7.20
  21.  
  22. %prep
  23. %setup -q
  24.  
  25. %build
  26. ./configure
  27. make
  28.  
  29. %install
  30. make install prefix=$RPM_BUILD_ROOT/usr
  31.  
  32. %files
  33. %defattr(-,root,root)
  34. /usr/bin/curl
  35. /usr/bin/curl-config
  36. /usr/include/curl/curl.h
  37. /usr/include/curl/curlbuild.h
  38. /usr/include/curl/curlrules.h
  39. /usr/include/curl/curlver.h
  40. /usr/include/curl/easy.h
  41. /usr/include/curl/mprintf.h
  42. /usr/include/curl/multi.h
  43. /usr/include/curl/stdcheaders.h
  44. /usr/include/curl/typecheck-gcc.h
  45. /usr/include/curl/types.h
  46. /usr/lib/libcurl.a
  47. /usr/lib/libcurl.la
  48. /usr/lib/libcurl.so
  49. /usr/lib/libcurl.so.3
  50. /usr/lib/libcurl.so.3.0.0
  51. /usr/lib/libcurl.so.4
  52. /usr/lib/libcurl.so.4.2.0
  53. /usr/lib/pkgconfig/libcurl.pc
  54. /usr/share/man/man1/curl-config.1.gz
  55. /usr/share/man/man3/curl_easy_cleanup.3.gz
  56. /usr/share/man/man3/curl_easy_duphandle.3.gz
  57. /usr/share/man/man3/curl_easy_escape.3.gz
  58. /usr/share/man/man3/curl_easy_getinfo.3.gz
  59. /usr/share/man/man3/curl_easy_init.3.gz
  60. /usr/share/man/man3/curl_easy_pause.3.gz
  61. /usr/share/man/man3/curl_easy_perform.3.gz
  62. /usr/share/man/man3/curl_easy_recv.3.gz
  63. /usr/share/man/man3/curl_easy_reset.3.gz
  64. /usr/share/man/man3/curl_easy_send.3.gz
  65. /usr/share/man/man3/curl_easy_setopt.3.gz
  66. /usr/share/man/man3/curl_easy_strerror.3.gz
  67. /usr/share/man/man3/curl_easy_unescape.3.gz
  68. /usr/share/man/man3/curl_escape.3.gz
  69. /usr/share/man/man3/curl_formadd.3.gz
  70. /usr/share/man/man3/curl_formfree.3.gz
  71. /usr/share/man/man3/curl_formget.3.gz
  72. /usr/share/man/man3/curl_free.3.gz
  73. /usr/share/man/man3/curl_getdate.3.gz
  74. /usr/share/man/man3/curl_getenv.3.gz
  75. /usr/share/man/man3/curl_global_cleanup.3.gz
  76. /usr/share/man/man3/curl_global_init.3.gz
  77. /usr/share/man/man3/curl_global_init_mem.3.gz
  78. /usr/share/man/man3/curl_mprintf.3.gz
  79. /usr/share/man/man3/curl_multi_add_handle.3.gz
  80. /usr/share/man/man3/curl_multi_assign.3.gz
  81. /usr/share/man/man3/curl_multi_cleanup.3.gz
  82. /usr/share/man/man3/curl_multi_fdset.3.gz
  83. /usr/share/man/man3/curl_multi_info_read.3.gz
  84. /usr/share/man/man3/curl_multi_init.3.gz
  85. /usr/share/man/man3/curl_multi_perform.3.gz
  86. /usr/share/man/man3/curl_multi_remove_handle.3.gz
  87. /usr/share/man/man3/curl_multi_setopt.3.gz
  88. /usr/share/man/man3/curl_multi_socket.3.gz
  89. /usr/share/man/man3/curl_multi_socket_action.3.gz
  90. /usr/share/man/man3/curl_multi_strerror.3.gz
  91. /usr/share/man/man3/curl_multi_timeout.3.gz
  92. /usr/share/man/man3/curl_share_cleanup.3.gz
  93. /usr/share/man/man3/curl_share_init.3.gz
  94. /usr/share/man/man3/curl_share_setopt.3.gz
  95. /usr/share/man/man3/curl_share_strerror.3.gz
  96. /usr/share/man/man3/curl_slist_append.3.gz
  97. /usr/share/man/man3/curl_slist_free_all.3.gz
  98. /usr/share/man/man3/curl_strequal.3.gz
  99. /usr/share/man/man3/curl_unescape.3.gz
  100. /usr/share/man/man3/curl_version.3.gz
  101. /usr/share/man/man3/curl_version_info.3.gz
  102. /usr/share/man/man3/libcurl-easy.3.gz
  103. /usr/share/man/man3/libcurl-errors.3.gz
  104. /usr/share/man/man3/libcurl-multi.3.gz
  105. /usr/share/man/man3/libcurl-share.3.gz
  106. /usr/share/man/man3/libcurl-tutorial.3.gz
  107. /usr/share/man/man3/libcurl.3.gz
  108.  
  109. %doc %attr(0444,root,root) /usr/share/man/man1/curl.1.gz

On the next attempt to build the curl package from source using rpmbuild I didn’t have any issues. I will be writing a couple more articles related to building RPM’s in the next day or so as I ran into a couple different issues and noting them here should help others that are new to RPM building.

Linux Cookbook (Paperback)


List Price: $49.99 USD
New From: $9.95 USD In Stock
Used from: $1.54 USD In Stock

Fedora Linux: A Complete Guide to Red Hat’s Community Distribution (Paperback)


List Price: $39.99 USD
New From: $20.52 USD In Stock
Used from: $2.06 USD In Stock

Share