Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: Shell script to fix libportaudio* on the latest Ubuntu based distribution

Shell script to fix libportaudio* on the latest Ubuntu based distribution 2 months, 3 weeks ago #181411

  • Tracnac
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • 2 months, 3 weeks ago
Hello,

My first post/contribution, first a big thanks to Lightworks to provide this software on Linux/OsX.

This shell script fix the launch/close error with Lightworks on the latest Ubuntu based distribution. (Tested on Linux Mint 19)

if the last lines in the error.log are something like :
0.862    : ------ Loading plugin : PortAudio ------
PortAudio version number = 1246720
PortAudio version text = 'PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4'
Number of devices = 17


This script is for you...

If I summarize what the script do :

- download pkg
- check pkg with md5
- extract pkg
- copy files in good place

This script break nothing from the os side (install and remove nothing)
You need an admin user for the last part "sudo cp..." and some space in /tmp

Thanks Yvan.
Please report any problem and do what you want with this script.

#!/bin/bash
# Fix lightworks on Linux Mint 19 (Maybe other versions don't know...)
# This method don't break anything os side
# You need a user with admin privs for the last step (sudo)
# Y.GALAS 2018

# Define package vars
_libportaudio2_link="http://security.ubuntu.com/ubuntu/pool/main/p/portaudio19/libportaudio2_19+svn20140130-1build1_amd64.deb"
_libportaudiocpp0_link="http://security.ubuntu.com/ubuntu/pool/main/p/portaudio19/libportaudiocpp0_19+svn20140130-1build1_amd64.deb"
_libportaudio2_pkg="libportaudio2_19+svn20140130-1build1_amd64.deb"
_libportaudio2_md5="4eb9d7d43097fd5d0e9dfd1761c31a91"
_libportaudiocpp0_pkg="libportaudiocpp0_19+svn20140130-1build1_amd64.deb"
_libportaudiocpp0_md5="a3786df8cc5bc7550eb261a05162d111"

# Check wget and dpkg
_wget=`/usr/bin/which wget`
_dpkg=`/usr/bin/which dpkg`
if [ -z "${_wget}" ] || [ -z "${_dpkg}" ]
then
    echo "Please install wget and dpkg..."
    echo "sudo apt-get install wget dpkg"
    exit -1
fi

# Download and Checksum
echo "Step > Download and checksum"
for file in _libportaudio2 _libportaudiocpp0
do
    _link="${file}_link"
    _pkg="${file}_pkg"
    _md5="${file}_md5"
    if [ ! -f ${!_pkg} ]
    then
        ${_wget} --quiet ${!_link}
    fi
    _tmp=`/usr/bin/md5sum -b ${!_pkg} | /usr/bin/awk '{print $1}'`

    if [ "${_tmp}" != "${!_md5}" ]
    then
        echo
        echo "Error md5 checkum does not match..."
        echo "Correct md5 checksum for ${!_pkg} is ${!_md5} found : ${_tmp}"
        exit -1
    fi
done
echo "Step < Done"

# Extract deb
echo "Step > Extract packages"
if [ -d "/tmp/fix_lightworks" ]
then
    rm -r /tmp/fix_lightworks
fi
for file in _libportaudio2 _libportaudiocpp0
do
    _pkg="${file}_pkg"
    ${_dpkg} -x ${!_pkg} /tmp/fix_lightworks
done
if [ ! -d "/tmp/fix_lightworks" ] \
        || [ ! -f "/tmp/fix_lightworks/usr/lib/x86_64-linux-gnu/libportaudio.so.2.0.0" ] \
        || [ ! -f "/tmp/fix_lightworks/usr/lib/x86_64-linux-gnu/libportaudiocpp.so.0.0.12" ]
then
    echo "Humm weird error cannot extract files"
    echo "Please check what is going on with your /tmp"
    echo "Step < Failed"
    exit -1
fi
echo "Step < Done"

# Copy files
echo "Step > Copy lib files to lightworks libs"
    sudo cp -d /tmp/fix_lightworks/usr/lib/x86_64-linux-gnu/libportaudio* /usr/lib/lightworks
    ls -lrt /usr/lib/lightworks/libportaudio*
echo "Step < Done"
Attachments:
  • Attachment This attachment is hidden for guests. Please log in or register to see it.
Last Edit: 2 months, 3 weeks ago by Tracnac.

Re: Shell script to fix libportaudio* on the latest Ubuntu based distribution 2 months, 3 weeks ago #181412

  • hugly
  • OFFLINE
  • Platinum Boarder
  • Posts: 15520
  • 2 months, 3 weeks ago
Hello,

As far as I know, .sh extension isn't a valid extension for attachments. Either rename to .txt or (maybe better) edit your post and attach a zipped archive with the script.

Please note: V14.0 is close to end of life and V14.5 (downloadable from Downloads on top of this page) has a lot of improvements related to Linux, e.g. portaudio is included and downgrading isn't needed anymore?
It's better to travel well than to arrive...
Last Edit: 2 months, 3 weeks ago by hugly.

Re: Shell script to fix libportaudio* on the latest Ubuntu based distribution 2 months, 3 weeks ago #181418

  • Tracnac
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • 2 months, 3 weeks ago
Humm d'accord

I did not notice the link for 14.5 !

Thanks Yvan
  • Page:
  • 1
Time to create page: 0.39 seconds
Scroll To Top