# CPack : automatically offer user to install RPM dependencies ?

**URL:** https://discourse.cmake.org/t/cpack-automatically-offer-user-to-install-rpm-dependencies/7847
**Category:** Code
**Created:** [April 6, 2023, 11:56pm UTC](https://discourse.cmake.org/t/cpack-automatically-offer-user-to-install-rpm-dependencies/7847 "2023-04-06T23:56:54Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Nicholas\_Yue](https://discourse.cmake.org/user_avatar/discourse.cmake.org/nicholas_yue/32/464_2.png) [@Nicholas\_Yue](https://discourse.cmake.org/u/Nicholas_Yue)
#### Post date: [April 6, 2023, 11:56pm UTC](https://discourse.cmake.org/t/cpack-automatically-offer-user-to-install-rpm-dependencies/7847/1 "2023-04-06T23:56:54Z")

</div>

I set the following

```auto
set(CPACK_RPM_PACKAGE_REQUIRES "boost_filesystem,boost_graph,boost_log,boost_log_setup,boost_serialization,boost_unit_test_framework,cmake-filesystem")
set(CPACK_RPM_PACKAGE_REQUIRES_PRE "boost_filesystem,boost_graph,boost_log,boost_log_setup,boost_serialization,boost_unit_test_framework,cmake-filesystem")

```

I tried installing the generated RPM package but it just says to install the required dependencies but does not offer the user and easier options to just type e.g. `Y` at the prompt to do the installation.

I recall some RPM is built to offer that but I don’t know how those RPMs were build.

Is there some flags I can set in CMake/CPack to effect that ?

Kind regards

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 24, 2023, 4:40am UTC](https://discourse.cmake.org/t/cpack-automatically-offer-user-to-install-rpm-dependencies/7847/2 "2023-04-24T04:40:50Z")

</div>

`rpm -i` doesn’t know how to install dependencies. You should probably use `dnf install`, `yum install`, or `zypp install` (or whatever the Suse tool is).

---

<div class="post-metadata">

### Author: ![Nicholas\_Yue](https://discourse.cmake.org/user_avatar/discourse.cmake.org/nicholas_yue/32/464_2.png) [@Nicholas\_Yue](https://discourse.cmake.org/u/Nicholas_Yue)
#### Post date: [April 24, 2023, 4:57am UTC](https://discourse.cmake.org/t/cpack-automatically-offer-user-to-install-rpm-dependencies/7847/3 "2023-04-24T04:57:47Z")

</div>

Thanks for the advice @ben.boeckel
