Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6588 Discussions

Package script bug: link_install.sh and tr -s [:blank:]

Scott__Malcolm
Beginner
124 Views

Having installed the package intel-comp-l-all-vars-19.0.1-144 via apt on Ubuntu, I've run into a problem with the script at /opt/intel/compilers_and_libraries_2019.1.144/linux/bin/link_install.sh which is run as part of the installation process.  On my system this script fails and prevents apt from completing.

This is because it contains a few instances of lines like:

str=$(echo $str | tr -s [:blank:] | sed 's/^ *//g')

The problem here is the

[:blank:]

On most systems it will do the right thing -- but square brackets actually denote a bash glob.  So if it happens to match files called e.g. "b", "l" or "a" (in your root directory, from where apt runs the script), bash will substitute those in place of [:blank:] and tr will get the wrong arguments.

I happen to have both a /a and a /n on my systems, so what gets run is "tr -s a n" which substitutes all "a"s for "n"s... definitely not what the author intended!  The symptom is lines such as

/opt/intel/compilers_and_libraries_2019.1.144/linux/bin/link_install.sh: line 565: =/opt/intel/compilers_nd_librnries: No such file or directory

output by apt (or dpkg) before the installation aborts.

Simple fix: put every instance of [:blank:] in quotes: "[:blank:]".

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
124 Views

interesting, Thanks Scott. we will inform our install team about this fix. 

Reply