<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: recent update to intel-oneapi-runtime-opencl has broken apt on my linux system in OpenCL* for CPU</title>
    <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1688823#M7393</link>
    <description>&lt;P&gt;Thanks, here's the full updated script for my own reference and others:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;#!/bin/bash

# Copyright Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials,
# and your use of them is governed by the express license under which they
# were provided to you ("License"). Unless the License provides otherwise,
# you may not use, modify, copy, publish, distribute, disclose or transmit
# this software or the related documents without Intel's prior written
# permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in the
# License.

INSTALL_DIR=/opt/intel/oneapi/redist

#
#   If post-install script failed to install alternative, uninstalling package also fails, because
#   'update-alternatives' cannot remove non-existing alternative. Let us check the alternative
#   exists before removing it.
#
#remove_alternative() {
#    update-alternatives --display "$1" &amp;amp;&amp;gt;/dev/null
#    if [ $? = 0 ]; then
#        update-alternatives --remove "$1" "$2"
#    else
#        echo "Alternative for $1 is not found, skipping ..."
#    fi
#}

remove_alternative() {
    if update-alternatives --display "$1" &amp;amp;&amp;gt;/dev/null; then
        update-alternatives --remove "$1" "$2"
    else
        echo "Alternative for $1 is not found, skipping ..."
    fi
}

set -e

LIB_OPENCL_SO=`find "${INSTALL_DIR}" -name "libOpenCL.so"`

if [ "${LIB_OPENCL_SO}" ]; then
    remove_alternative opencl-libOpenCL.so  "${LIB_OPENCL_SO}"
fi

LIB_INSTALL_DIR="${INSTALL_DIR}"
remove_alternative opencl-intel-runtime "${LIB_INSTALL_DIR}"

if [ -e "/etc/OpenCL/vendors" ] ; then
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL/vendors" 2&amp;gt;/dev/null
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL" 2&amp;gt;/dev/null
#    if [ -z "$(ls -A /etc)" ] ; then
#        rmdir "/etc" 2&amp;gt;/dev/null
#    fi
fi

exit 0&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 09 May 2025 09:54:35 GMT</pubDate>
    <dc:creator>crobar</dc:creator>
    <dc:date>2025-05-09T09:54:35Z</dc:date>
    <item>
      <title>recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685425#M7384</link>
      <description>&lt;P&gt;I recently installed an update for the above package via apt. I get the following error:&lt;BR /&gt;&lt;BR /&gt;Preparing to unpack .../intel-oneapi-runtime-opencl_2025.1.0-973_amd64.deb ...&lt;BR /&gt;dpkg: warning: old intel-oneapi-runtime-opencl package pre-removal script subprocess returned error exit status 2&lt;BR /&gt;dpkg: trying script from the new package instead ...&lt;BR /&gt;dpkg: error processing archive /var/cache/apt/archives/intel-oneapi-runtime-opencl_2025.1.0-973_amd64.deb (--unpack):&lt;BR /&gt;new intel-oneapi-runtime-opencl package pre-removal script subprocess returned error exit status 2&lt;BR /&gt;openCL has already registered, skipping update-alternatives ...&lt;BR /&gt;update-alternatives: warning: forcing reinstallation of alternative /opt/intel/oneapi/redist because link group opencl-intel-runtime is broken&lt;BR /&gt;Errors were encountered while processing:&lt;BR /&gt;/var/cache/apt/archives/intel-oneapi-runtime-opencl_2025.1.0-973_amd64.deb&lt;BR /&gt;E: Sub-process /usr/bin/dpkg returned an error code (1)&lt;BR /&gt;&lt;BR /&gt;it seem maybe the package fails to unpack&lt;BR /&gt;&lt;BR /&gt;Now apt is broken and I can't update anything n the system.&lt;/P&gt;&lt;P&gt;My system is running Mint Linux 21.1 (which is based on Ubuntu 22.04)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;How do I fix this?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 10:04:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685425#M7384</guid>
      <dc:creator>crobar</dc:creator>
      <dc:date>2025-04-25T10:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685433#M7385</link>
      <description>&lt;P&gt;The root cause of the problem is the pre-removal script which contains a silly error, and some crazy stuff which I hope is removed in the new version.&lt;/P&gt;&lt;P&gt;I mean this script&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/var/lib/dpkg/info/intel-oneapi-runtime-opencl.prerm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the script fails because it sets set -e in the body, but also contains the following function at the top&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;remove_alternative() {
    update-alternatives --display "$1" &amp;amp;&amp;gt;/dev/null
    if [ $? = 0 ]; then
        update-alternatives --remove "$1" "$2"
    else
        echo "Alternative for $1 is not found, skipping ..."
    fi
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when the following command in this function returns a non-zero exit code the script exits and returns that exit code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;update-alternatives --display "$1" &amp;amp;&amp;gt;/dev/null

​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, as for the crazy stuff, there's also the following snippet:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;if [ -e "/etc/OpenCL/vendors" ] ; then
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL/vendors" 2&amp;gt;/dev/null
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL" 2&amp;gt;/dev/null
    if [ -z "$(ls -A /etc)" ] ; then
        rmdir "/etc" 2&amp;gt;/dev/null
    fi
fi&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So there's some possibility this script will decide to just go delete /etc !!!!&amp;nbsp; WTF?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 10:48:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685433#M7385</guid>
      <dc:creator>crobar</dc:creator>
      <dc:date>2025-04-25T10:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685438#M7386</link>
      <description>&lt;P&gt;For anyone else struggling with this, replace the script mentioned in the previous post with something like the following and you will be able to fix your installation. I also comment out the dangerous "rmdir /etc" to avoid that possibility.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;#!/bin/bash

# Copyright Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials,
# and your use of them is governed by the express license under which they
# were provided to you ("License"). Unless the License provides otherwise,
# you may not use, modify, copy, publish, distribute, disclose or transmit
# this software or the related documents without Intel's prior written
# permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in the
# License.

INSTALL_DIR=/opt/intel/oneapi/redist

#
#   If post-install script failed to install alternative, uninstalling package also fails, because
#   'update-alternatives' cannot remove non-existing alternative. Let us check the alternative
#   exists before removing it.
#
#remove_alternative() {
#    update-alternatives --display "$1" &amp;amp;&amp;gt;/dev/null
#    if [ $? = 0 ]; then
#        update-alternatives --remove "$1" "$2"
#    else
#        echo "Alternative for $1 is not found, skipping ..."
#    fi
#}

remove_alternative() {
    if update-alternatives --display "$1" &amp;amp;&amp;gt;/dev/null; then
        update-alternatives --remove "$1" "$2"
    else
        echo "Alternative for $1 is not found, skipping ..."
    fi
}

set -e

LIB_OPENCL_SO=`find "${INSTALL_DIR}" -name "libOpenCL.so"`

if [ "${LIB_OPENCL_SO}" ]; then
    remove_alternative opencl-libOpenCL.so  "${LIB_OPENCL_SO}"
fi

LIB_INSTALL_DIR="${INSTALL_DIR}"
remove_alternative opencl-intel-runtime "${LIB_INSTALL_DIR}"

if [ -e "/etc/OpenCL/vendors" ] ; then
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL/vendors" 2&amp;gt;/dev/null
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL" 2&amp;gt;/dev/null
    if [ -z "$(ls -A /etc)" ] ; then
#        rmdir "/etc" 2&amp;gt;/dev/null
    fi
fi

exit 0&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 11:00:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685438#M7386</guid>
      <dc:creator>crobar</dc:creator>
      <dc:date>2025-04-25T11:00:15Z</dc:date>
    </item>
    <item>
      <title>Re:recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685503#M7387</link>
      <description>&lt;P&gt;Hi Richard, we hope you are doing great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you kindly confirm whether your issue has been resolved, or if you require further assistance from Intel®? This will enable us to investigate further or direct your request to the higher team for additional assistance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a great day ahead!&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Apr 2025 17:02:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685503#M7387</guid>
      <dc:creator>Deeksha_S_Intel</dc:creator>
      <dc:date>2025-04-25T17:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685562#M7388</link>
      <description>&lt;P&gt;The immediate problem is solved for me personally, but the general issue should be escalated to the development team for investigation.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 21:24:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685562#M7388</guid>
      <dc:creator>crobar</dc:creator>
      <dc:date>2025-04-25T21:24:27Z</dc:date>
    </item>
    <item>
      <title>Re:recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685564#M7389</link>
      <description>&lt;P&gt;Hi Richard, thank you for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We would like to inform you that we are routing your query to the dedicated team for further assistance.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Apr 2025 21:55:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1685564#M7389</guid>
      <dc:creator>Deeksha_S_Intel</dc:creator>
      <dc:date>2025-04-25T21:55:04Z</dc:date>
    </item>
    <item>
      <title>Re:recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1686531#M7390</link>
      <description>&lt;P&gt;Thanks for your investigation. We have reported the issue to the related team and will let you know when we have any updates. &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Apr 2025 03:24:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1686531#M7390</guid>
      <dc:creator>cw_intel</dc:creator>
      <dc:date>2025-04-30T03:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1687255#M7391</link>
      <description>&lt;P&gt;consider changing....&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if [ -e "/etc/OpenCL/vendors" ] ; then
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL/vendors" 2&amp;gt;/dev/null
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL" 2&amp;gt;/dev/null
    if [ -z "$(ls -A /etc)" ] ; then
#        rmdir "/etc" 2&amp;gt;/dev/null
    fi
fi&lt;/LI-CODE&gt;&lt;P&gt;to...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if [ -e "/etc/OpenCL/vendors" ] ; then
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL/vendors" 2&amp;gt;/dev/null
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL" 2&amp;gt;/dev/null
#    if [ -z "$(ls -A /etc)" ] ; then
#        rmdir "/etc" 2&amp;gt;/dev/null
#    fi
fi&lt;/LI-CODE&gt;&lt;P&gt;just bc some shell's might get cranky&lt;/P&gt;</description>
      <pubDate>Sat, 03 May 2025 20:37:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1687255#M7391</guid>
      <dc:creator>captainabernathy</dc:creator>
      <dc:date>2025-05-03T20:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1688822#M7392</link>
      <description>&lt;P&gt;New update has been pushed out, and the issue is still present, and broken my package manager again.&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 09:52:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1688822#M7392</guid>
      <dc:creator>crobar</dc:creator>
      <dc:date>2025-05-09T09:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: recent update to intel-oneapi-runtime-opencl has broken apt on my linux system</title>
      <link>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1688823#M7393</link>
      <description>&lt;P&gt;Thanks, here's the full updated script for my own reference and others:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="bash"&gt;#!/bin/bash

# Copyright Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials,
# and your use of them is governed by the express license under which they
# were provided to you ("License"). Unless the License provides otherwise,
# you may not use, modify, copy, publish, distribute, disclose or transmit
# this software or the related documents without Intel's prior written
# permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in the
# License.

INSTALL_DIR=/opt/intel/oneapi/redist

#
#   If post-install script failed to install alternative, uninstalling package also fails, because
#   'update-alternatives' cannot remove non-existing alternative. Let us check the alternative
#   exists before removing it.
#
#remove_alternative() {
#    update-alternatives --display "$1" &amp;amp;&amp;gt;/dev/null
#    if [ $? = 0 ]; then
#        update-alternatives --remove "$1" "$2"
#    else
#        echo "Alternative for $1 is not found, skipping ..."
#    fi
#}

remove_alternative() {
    if update-alternatives --display "$1" &amp;amp;&amp;gt;/dev/null; then
        update-alternatives --remove "$1" "$2"
    else
        echo "Alternative for $1 is not found, skipping ..."
    fi
}

set -e

LIB_OPENCL_SO=`find "${INSTALL_DIR}" -name "libOpenCL.so"`

if [ "${LIB_OPENCL_SO}" ]; then
    remove_alternative opencl-libOpenCL.so  "${LIB_OPENCL_SO}"
fi

LIB_INSTALL_DIR="${INSTALL_DIR}"
remove_alternative opencl-intel-runtime "${LIB_INSTALL_DIR}"

if [ -e "/etc/OpenCL/vendors" ] ; then
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL/vendors" 2&amp;gt;/dev/null
    rmdir --ignore-fail-on-non-empty "/etc/OpenCL" 2&amp;gt;/dev/null
#    if [ -z "$(ls -A /etc)" ] ; then
#        rmdir "/etc" 2&amp;gt;/dev/null
#    fi
fi

exit 0&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 May 2025 09:54:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/OpenCL-for-CPU/recent-update-to-intel-oneapi-runtime-opencl-has-broken-apt-on/m-p/1688823#M7393</guid>
      <dc:creator>crobar</dc:creator>
      <dc:date>2025-05-09T09:54:35Z</dc:date>
    </item>
  </channel>
</rss>

