@@ -128,7 +128,9 @@ apt_install_dependencies() {
128128do_ubuntu_install () {
129129
130130 install_dependencies () {
131- apt_install_dependencies g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg
131+ if ! apt_install_dependencies g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg; then
132+ die " Dependencies could not be installed. Please run 'apt-get update' and try again."
133+ fi
132134 }
133135
134136 if is_arm ; then
@@ -154,7 +156,9 @@ do_ubuntu_install() {
154156do_debian_install () {
155157
156158 install_dependencies () {
157- apt_install_dependencies g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev
159+ if ! apt_install_dependencies g++ gcc libc6-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev; then
160+ die " Dependencies could not be installed. Please run 'apt-get update' and try again."
161+ fi
158162 }
159163
160164 if is_arm ; then
@@ -178,7 +182,9 @@ do_debian_install() {
178182# and install the necessary dependencies explicitly.
179183do_fedora_install () {
180184 install_dependencies () {
181- dnf_install_pkgs perl make automake gcc gmp-devel libffi zlib xz tar
185+ if ! dnf_install_pkgs perl make automake gcc gmp-devel libffi zlib xz tar; then
186+ die " Dependencies could not be installed. Please run 'dnf check-update' and try again."
187+ fi
182188 }
183189
184190 if is_64_bit ; then
@@ -198,7 +204,9 @@ do_fedora_install() {
198204# and install the necessary dependencies explicitly.
199205do_centos_install () {
200206 install_dependencies () {
201- yum_install_pkgs perl make automake gcc gmp-devel libffi zlib xz tar
207+ if ! yum_install_pkgs perl make automake gcc gmp-devel libffi zlib xz tar; then
208+ die " Dependencies could not be installed. Please run 'yum check-update' and try again."
209+ fi
202210 }
203211
204212 if is_64_bit ; then
@@ -236,7 +244,9 @@ do_osx_install() {
236244# 'pkg install' and then downloads bindist.
237245do_freebsd_install () {
238246 install_dependencies () {
239- sudocmd pkg install -y devel/gmake perl5 lang/gcc misc/compat8x misc/compat9x converters/libiconv ca_root_nss
247+ if ! sudocmd pkg install -y devel/gmake perl5 lang/gcc misc/compat8x misc/compat9x converters/libiconv ca_root_nss; then
248+ die " Dependencies could not be installed. Please run 'pkg update' and try again."
249+ fi
240250 }
241251 if is_64_bit ; then
242252 install_dependencies
@@ -249,7 +259,9 @@ do_freebsd_install() {
249259# Alpine distro install
250260do_alpine_install () {
251261 install_dependencies () {
252- apk_install_pkgs gmp libgcc xz make
262+ if ! apk_install_pkgs gmp libgcc xz make; then
263+ die " Dependencies could not be installed. Please run 'apk update' and try again."
264+ fi
253265 }
254266 install_dependencies
255267 if is_64_bit ; then
0 commit comments