Skip to content

Commit

Permalink
install-tools: Fix install error
Browse files Browse the repository at this point in the history
Newer Ubuntu versions don't include libncurses5, so the installation
is failed. This commit checks whether the specified library versions
are available and attempts to install the required ones separately.
  • Loading branch information
SPRESENSE committed Nov 20, 2024
1 parent 0219acb commit 4c36814
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions install-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ run_progress()

linux_install_tools()
{
local _packages="git gperf libncurses5 libncurses5-dev flex bison genromfs pkg-config autoconf automake curl make minicom unzip"
local _packages="git gperf libncurses5 libncurses6 libncurses5-dev libncurses-dev flex bison genromfs pkg-config autoconf automake curl make minicom unzip"
local _needed
for p in ${_packages}; do
dpkg -s $p >/dev/null 2>&1 || _needed="${_needed} ${p}"
if LANG=C apt-cache policy $p | grep -q "Candidate:"; then
dpkg -s $p >/dev/null 2>&1 || _needed="${_needed} ${p}"
fi
done

if [ -n "${_needed}" ]; then
Expand Down

0 comments on commit 4c36814

Please sign in to comment.