Getting ERROR Executing command failed: chmod 777 -R /opt/kaltura/tmp while installing Kaltura CE v3.0.0 in Ubuntu 12.04.5

Hi @annapurnamangaraj,

I don’t see any attachments here…
At any rate, see:

Should it fail, please include all relevant info: the point of failure, final error message and full output of the deployment script and I’ll gladly help you further.

Hi Jess,

We followed the link for the installation process but were stuck in the middle.

Prerequisites:
JRE 1.8 installed instead of JRE 1.7
32 bit system instead of 64 bit
Ubuntu OS 12.04 instead of 14.04
PHP 5.3 installed

Under Pre-Install Notes:-
Step1: We have 32 bit Ubuntu 12.04.5 LTS. Will it work on this?
Step2: How to verify whether /etc/hosts file is properly configured or not?

Under Disable SELinux - REQUIRED:-
SELinux is not installed so already disabled. So no need to install it?

Under Setup the Kaltura deb repository:-
On running the below commands -

wget -O - http://installrepo.kaltura.org/repo/apt/debian/kaltura-deb.gpg.key|apt-key add -

We are getting the following Output:
–2017-07-21 16:10:24-- http://installrepo.kaltura.org/repo/apt/debian/kaltura-deb.gpg.key
Resolving installrepo.kaltura.org (installrepo.kaltura.org)… failed: Name or service not known.
wget: unable to resolve host address `installrepo.kaltura.org
gpg: no valid OpenPGP data found.

We made necessary changes in /etc/apt/sources.list and added the lines mentioned in the steps to the file.

On running db command, we observe following output:
root@infosys-DirectTv-Lab:/etc# dpkg-reconfigure kaltura-db
Package `kaltura-db’ is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
/usr/sbin/dpkg-reconfigure: kaltura-db is not installed

Please tell us how to proceed now.

Hi @annapurnamangaraj,

No, it will not work, as stated here: https://github.com/kaltura/platform-install-packages/blob/Mercury-13.0.0/doc/pre-requisites.md we only support 64bit.

Regardless:

Would imply you also have a DNS issue.

Hi jess,

We upgraded our system to 64-bit OS and Ubuntu Xenial (16.04)
The DNS issue is resolved as we are no more getting the above mentioned error.
We were able to install Kaltura-base and Kaltura-front but in the middle of Kaltura-DB installation process we received the following error:
Logs
The following NEW packages will be installed:
kaltura-db
0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 4,444 B of archives.
After this operation, 8,192 B of additional disk space will be used.
Get:1 http://installrepo.kaltura.org/repo/apt/xenial lynx/main amd64 kaltura-db all 12.15.0-1+b4 [4,444 B]
Fetched 4,444 B in 1s (3,263 B/s)
N: Ignoring file ‘percona-release_0.1-4.xenial_all.deb’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
N: Ignoring file ‘install_kaltura_all_in_1.sh’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
Preconfiguring packages …
Selecting previously unselected package kaltura-db.
(Reading database … 266681 files and directories currently installed.)
Preparing to unpack …/kaltura-db_12.15.0-1+b4_all.deb …
Unpacking kaltura-db (12.15.0-1+b4) …
Setting up kaltura-db (12.15.0-1+b4) …

Checking MySQL version…
ERROR 2005 (HY000): Unknown MySQL server host ‘Kaltura_DB’ (0)

kaltura-db.postinst FAILED with: 5017 on line 126

Archving logs to /opt/kaltura/log/log_24_07_17_15_33.tar.gz…

dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 11
N: Ignoring file ‘percona-release_0.1-4.xenial_all.deb’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
N: Ignoring file ‘install_kaltura_all_in_1.sh’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)
End

We tried to drop the database using command “/opt/kaltura/bin/kaltura-drop-db.sh” but ended up getting the following error:
ERROR 1396 (HY000) at line 1: Operation DROP USER failed for ‘kaltura’@’%’

So, we removed all the related files and tried to re-install but everytime it failed with Kaltura-DB error:
{The following partially installed packages will be configured:
kaltura-db
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up kaltura-db (12.15.0-1+b4) …
ERROR: could not find /etc/kaltura.d/system.ini so, exiting…
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
kaltura-db
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up kaltura-db (12.15.0-1+b4) …
ERROR: could not find /etc/kaltura.d/system.ini so, exiting…
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
kaltura-db
}

We want to remove kaltura completely and re-install the application. Please provide us the steps to do so.

Hi @annapurnamangaraj.

Your issue stems from the fact you provided an invalid hostname from the MySQL DB:

Therefore, the installation cannot communicate with it and fails.
Removal steps are documented here:

Hi jess,

I tried to remove the installation using the below steps as mentioned in the link provided:
/opt/kaltura/bin/kaltura-drop-db.sh
aptitude purge "~Nkaltura"
rm -rf /opt/kaltura
rm -rf /etc/kaltura.d

But i got the below error while executing “/opt/kaltura/bin/kaltura-drop-db.sh” :
Logs:
root@infy1-OptiPlex-380:~# /opt/kaltura/bin/kaltura-drop-db.sh
This will drop the following DBs:
kaltura kaltura_sphinx_log kalturadw kalturadw_ds kalturadw_bisources kalturalog
and remove users:
kaltura etl
on localhost
NOTE: this is not reversible.
It is recommended you also back up the current data using mysqldump before continuing.
You can use /opt/kaltura/bin/kaltura-export-db.sh to export the data.
Are you absolutely certain you want this? [n/Y]
Y
root DB passwd:
ERROR 1396 (HY000) at line 1: Operation DROP USER failed for ‘kaltura’@’%’

Then i executed the aptitude purge “~Nkaltura” which gave the below error:
Logs:
ERROR: Couldn’t make an API request to http://infy1-OptiPlex-380/api_v3/index.php?service=system&action=ping.
This will drop the following DBs:
kaltura kaltura_sphinx_log kalturadw kalturadw_ds kalturadw_bisources kalturalog
and remove users:
kaltura etl
on localhost
Removing kaltura…Removing kaltura_sphinx_log…Removing kalturadw…Removing kalturadw_ds…Removing kalturadw_bisources…Removing kalturalog…
Successfully dropped kaltura databases and users
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 6
Setting up aptitude-common (0.7.4-2ubuntu2) …
Setting up libcwidget3v5:amd64 (0.5.17-4ubuntu2) …
Setting up aptitude (0.7.4-2ubuntu2) …
update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode
Processing triggers for libc-bin (2.23-0ubuntu9) …
Errors were encountered while processing:
kaltura-db
N: Ignoring file ‘percona-release_0.1-4.xenial_all.deb’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
N: Ignoring file ‘install_kaltura_all_in_1.sh’ in directory ‘/etc/apt/sources.list.d/’ as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)

Then i removed the files as per the command (rm -rf /opt/kaltura and rm -rf /etc/kaltura.d).
I guess the uninstallation wasnot complete and hence when i am trying to install kaltura again, its throwing me the below error as it is not able to find the path (/etc/kaltura.d/) which we removed previously:

The following partially installed packages will be configured:
kaltura-db
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up kaltura-db (12.15.0-1+b4) …
ERROR: could not find /etc/kaltura.d/system.ini so, exiting…
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
kaltura-db
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up kaltura-db (12.15.0-1+b4) …
ERROR: could not find /etc/kaltura.d/system.ini so, exiting…
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
kaltura-db

I am unable to uninstall as the paths “/etc/kaltura.d” and “/opt/kaltura” no longer exist.
So can you please help me in uninstalling and installing kaltura from scratch?

Thanks,
Annapurna

@annapurnamangaraj,

You removed files that belong to the Kaltura deb packages before you properly purged them with:

# aptitude purge $PACKAGE_NAME

let’s start by checking which packages were marked as incomplete/partially installed. Run:

# dpkg -l "*kaltura*"|awk -F " " '{print $1" "$2}'

and paste the output here.

Command: dpkg -l “kaltura”|awk -F " " ‘{print $1" "$2}’

Output:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required
||/ Name
++±===========================-============-============-============================================================
ii kaltura-base
ii kaltura-clipapp
iF kaltura-db
ii kaltura-ffmpeg
ii kaltura-ffmpeg-aux
ii kaltura-front
ii kaltura-html5-studio
ii kaltura-html5lib
ii kaltura-kclip
ii kaltura-kcw
ii kaltura-kdp
ii kaltura-kdp3
ii kaltura-kdp3wrapper
ii kaltura-kdpwrapper
ii kaltura-kmc
ii kaltura-krecord
ii kaltura-kupload
un kaltura-libapache2-mod-php7
ii kaltura-php7-apcu
un kaltura-php7-cli
ii kaltura-php7-common
un kaltura-php7-curl
un kaltura-php7-gd
ii kaltura-php7-gmp
un kaltura-php7-mcrypt
un kaltura-php7-memcache
un kaltura-php7-mysql
un kaltura-php7-ssh2
un kaltura-php7-xsl
ii kaltura-postinst
ii kaltura-sphinx
ii kaltura-widgets

Run:
# find /var/lib/dpkg/info/ -name “kaltura-*rm” -exec rm {} ;

This will remove the {pre,post}rm scripts for the Kaltura packages, after that:
# aptitude purge “~Nkaltura”

should finish w/o errors.

Ran the above mentioned commands,i am still getting the below error:

Logs

root@infy1-OptiPlex-380:~# find /var/lib/dpkg/info/ -name “kaltura-*rm” -exec rm {} ;
root@infy1-OptiPlex-380:~# aptitude purge "~Nkaltura"
Package kaltura-nginx is not installed, so it will not be purged
Package kaltura-server is not installed, so it will not be purged
Package kaltura-php7-memcache is not installed, so it will not be purged
Package kaltura-pentaho is not installed, so it will not be purged
Package kaltura-php7-xsl is not installed, so it will not be purged
Package kaltura-php7 is not installed, so it will not be purged
Package kaltura-libfaac is not installed, so it will not be purged
Package kaltura-php7-mcrypt is not installed, so it will not be purged
Package kaltura-batch is not installed, so it will not be purged
Package kaltura-ffmpeg-devel is not installed, so it will not be purged
Package kaltura-php7-tidy is not installed, so it will not be purged
Package kaltura-php7-mysql is not installed, so it will not be purged
Package kaltura-php7-gd is not installed, so it will not be purged
Package kaltura-fdk-aac is not installed, so it will not be purged
Package kaltura-php7-curl is not installed, so it will not be purged
Package kaltura-php7-ldap is not installed, so it will not be purged
Package kaltura-red5 is not installed, so it will not be purged
Package kaltura-php7-intl is not installed, so it will not be purged
Package kaltura-php7-odbc is not installed, so it will not be purged
Package kaltura-php-pear is not installed, so it will not be purged
Package kaltura-libapache2-mod-php7 is not installed, so it will not be purged
Package kaltura-dwh is not installed, so it will not be purged
Package kaltura-php7-xmlrpc is not installed, so it will not be purged
Package kaltura-php7-snmp is not installed, so it will not be purged
Package kaltura-x264 is not installed, so it will not be purged
Package kaltura-php7-cli is not installed, so it will not be purged
Package kaltura-php7-dbg is not installed, so it will not be purged
Package kaltura-php7-dev is not installed, so it will not be purged
Package kaltura-php7-ssh2 is not installed, so it will not be purged
Package kaltura-php7-pspell is not installed, so it will not be purged
Package kaltura-php7-sqlite is not installed, so it will not be purged
Package kaltura-php7-recode is not installed, so it will not be purged
Package kaltura-php7-opcache is not installed, so it will not be purged
Package kaltura-php7-pgsql is not installed, so it will not be purged
Package kaltura-php7-mysqlnd is not installed, so it will not be purged
Package kaltura-sphinx is not installed, so it will not be purged
Package kaltura-nginx is not installed, so it will not be purged
Package kaltura-server is not installed, so it will not be purged
Package kaltura-php7-memcache is not installed, so it will not be purged
Package kaltura-pentaho is not installed, so it will not be purged
Package kaltura-php7-xsl is not installed, so it will not be purged
Package kaltura-php7 is not installed, so it will not be purged
Package kaltura-libfaac is not installed, so it will not be purged
Package kaltura-php7-mcrypt is not installed, so it will not be purged
Package kaltura-batch is not installed, so it will not be purged
Package kaltura-ffmpeg-devel is not installed, so it will not be purged
Package kaltura-php7-tidy is not installed, so it will not be purged
Package kaltura-php7-mysql is not installed, so it will not be purged
Package kaltura-php7-gd is not installed, so it will not be purged
Package kaltura-fdk-aac is not installed, so it will not be purged
Package kaltura-php7-curl is not installed, so it will not be purged
Package kaltura-php7-ldap is not installed, so it will not be purged
Package kaltura-red5 is not installed, so it will not be purged
Package kaltura-php7-intl is not installed, so it will not be purged
Package kaltura-php7-odbc is not installed, so it will not be purged
Package kaltura-php-pear is not installed, so it will not be purged
Package kaltura-libapache2-mod-php7 is not installed, so it will not be purged
Package kaltura-dwh is not installed, so it will not be purged
Package kaltura-php7-xmlrpc is not installed, so it will not be purged
Package kaltura-php7-snmp is not installed, so it will not be purged
Package kaltura-x264 is not installed, so it will not be purged
Package kaltura-php7-cli is not installed, so it will not be purged
Package kaltura-php7-dbg is not installed, so it will not be purged
Package kaltura-php7-dev is not installed, so it will not be purged
Package kaltura-php7-ssh2 is not installed, so it will not be purged
Package kaltura-php7-pspell is not installed, so it will not be purged
Package kaltura-php7-sqlite is not installed, so it will not be purged
Package kaltura-php7-recode is not installed, so it will not be purged
Package kaltura-php7-opcache is not installed, so it will not be purged
Package kaltura-php7-pgsql is not installed, so it will not be purged
Package kaltura-php7-mysqlnd is not installed, so it will not be purged
Package kaltura-sphinx is not installed, so it will not be purged
The following partially installed packages will be configured:
kaltura-db
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up kaltura-db (12.15.0-1+b4) …
ERROR: could not find /etc/kaltura.d/system.ini so, exiting…
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
kaltura-db
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up kaltura-db (12.15.0-1+b4) …
ERROR: could not find /etc/kaltura.d/system.ini so, exiting…
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
kaltura-db

Run the following commands:
# rm /var/lib/dpkg/info/kaltura-db.p*
# aptitude install -f
# aptitude purge “~Nkaltura”

I ran the above mentioned commands and couldnot see the above mentioned errors for kaltura-db anymore.

So can i follow the same steps as before to install kaltura from the scratch now?
(https://github.com/kaltura/platform-install-packages/blob/Lynx-12.20.0/doc/install-kaltura-xenial.md)

Yes. Make sure to provide a valid, resolvable hostname for both your DB and Apache.
The Apache virtual host/service URL/endpoint has to be accessible from both within the server and any external machine you intend to play videos from or manage the server.

Yes will do so.

Now when i tried to install kaltura following the proper steps, after running the command (aptitude install kaltura-php7) i am getting the below error:
Logs:

root@infy1-OptiPlex-380:~# aptitude install kaltura-php7
The following NEW packages will be installed:
kaltura-libapache2-mod-php7{ab} kaltura-php7 kaltura-php7-cli{a} kaltura-php7-curl{a} kaltura-php7-gd{a} kaltura-php7-mcrypt{a}
kaltura-php7-memcache{a} kaltura-php7-mysql{ab} kaltura-php7-opcache{a} kaltura-php7-ssh2{a} kaltura-php7-xsl{a} libonig2{a}
0 packages upgraded, 12 newly installed, 0 to remove and 5 not upgraded.
Need to get 4,659 kB of archives. After unpacking 21.8 MB will be used.

Selecting previously unselected package libonig2:amd64.
(Reading database … 266519 files and directories currently installed.)
Preparing to unpack …/libonig2_5.9.6-1_amd64.deb …
Unpacking libonig2:amd64 (5.9.6-1) …
Selecting previously unselected package kaltura-php7-cli.
Preparing to unpack …/kaltura-php7-cli_7.0.0-9_amd64.deb …
Unpacking kaltura-php7-cli (7.0.0-9) …
Selecting previously unselected package kaltura-php7-curl.
Preparing to unpack …/kaltura-php7-curl_7.0.0-9_amd64.deb …
Unpacking kaltura-php7-curl (7.0.0-9) …
Selecting previously unselected package kaltura-php7-gd.
Preparing to unpack …/kaltura-php7-gd_7.0.0-9_amd64.deb …
Unpacking kaltura-php7-gd (7.0.0-9) …
Selecting previously unselected package kaltura-php7-mcrypt.
Preparing to unpack …/kaltura-php7-mcrypt_7.0.0-9_amd64.deb …
Unpacking kaltura-php7-mcrypt (7.0.0-9) …
Selecting previously unselected package kaltura-php7-xsl.
Preparing to unpack …/kaltura-php7-xsl_7.0.0-9_amd64.deb …
Unpacking kaltura-php7-xsl (7.0.0-9) …
Selecting previously unselected package kaltura-php7-memcache.
Preparing to unpack …/kaltura-php7-memcache_3.0.9-2_amd64.deb …
Unpacking kaltura-php7-memcache (3.0.9-2) …
Selecting previously unselected package kaltura-php7-ssh2.
Preparing to unpack …/kaltura-php7-ssh2_0.12-2_amd64.deb …
Unpacking kaltura-php7-ssh2 (0.12-2) …
Processing triggers for man-db (2.7.5-1) …
Setting up libonig2:amd64 (5.9.6-1) …
Setting up kaltura-php7-cli (7.0.0-9) …
Error: The new file /opt/kaltura/share/php7/php.ini-production.cli does not exist!
dpkg: error processing package kaltura-php7-cli (–configure):
subprocess installed post-installation script returned error exit status 1
Setting up kaltura-php7-curl (7.0.0-9) …
/var/lib/dpkg/info/kaltura-php7-curl.postinst: 32: /var/lib/dpkg/info/kaltura-php7-curl.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-curl (–configure):
subprocess installed post-installation script returned error exit status 127
Setting up kaltura-php7-gd (7.0.0-9) …
/var/lib/dpkg/info/kaltura-php7-gd.postinst: 32: /var/lib/dpkg/info/kaltura-php7-gd.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-gd (–configure):
subprocess installed post-installation script returned error exit status 127
Setting up kaltura-php7-mcrypt (7.0.0-9) …
/var/lib/dpkg/info/kaltura-php7-mcrypt.postinst: 32: /var/lib/dpkg/info/kaltura-php7-mcrypt.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-mcrypt (–configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Setting up kaltura-php7-xsl (7.0.0-9) …
/var/lib/dpkg/info/kaltura-php7-xsl.postinst: 32: /var/lib/dpkg/info/kaltura-php7-xsl.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-xsl (–configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Setting up kaltura-php7-memcache (3.0.9-2) …
/var/lib/dpkg/info/kaltura-php7-memcache.postinst: 9: /var/lib/dpkg/info/kaltura-php7-memcache.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-memcache (–configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Setting up kaltura-php7-ssh2 (0.12-2) …
/var/lib/dpkg/info/kaltura-php7-ssh2.postinst: 9: /var/lib/dpkg/info/kaltura-php7-ssh2.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-ssh2 (–configure):
subprocess installed post-installation script returned error exit status 127
No apport report written because MaxReports is reached already
Processing triggers for libc-bin (2.23-0ubuntu9) …
Errors were encountered while processing:
kaltura-php7-cli
kaltura-php7-curl
kaltura-php7-gd
kaltura-php7-mcrypt
kaltura-php7-xsl
kaltura-php7-memcache
kaltura-php7-ssh2
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up kaltura-php7-gd (7.0.0-9) …
/var/lib/dpkg/info/kaltura-php7-gd.postinst: 32: /var/lib/dpkg/info/kaltura-php7-gd.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-gd (–configure):
subprocess installed post-installation script returned error exit status 127
Setting up kaltura-php7-ssh2 (0.12-2) …
/var/lib/dpkg/info/kaltura-php7-ssh2.postinst: 9: /var/lib/dpkg/info/kaltura-php7-ssh2.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-ssh2 (–configure):
subprocess installed post-installation script returned error exit status 127
Setting up kaltura-php7-curl (7.0.0-9) …
/var/lib/dpkg/info/kaltura-php7-curl.postinst: 32: /var/lib/dpkg/info/kaltura-php7-curl.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-curl (–configure):
subprocess installed post-installation script returned error exit status 127
Setting up kaltura-php7-mcrypt (7.0.0-9) …
/var/lib/dpkg/info/kaltura-php7-mcrypt.postinst: 32: /var/lib/dpkg/info/kaltura-php7-mcrypt.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-mcrypt (–configure):
subprocess installed post-installation script returned error exit status 127
Setting up kaltura-php7-cli (7.0.0-9) …
Error: The new file /opt/kaltura/share/php7/php.ini-production.cli does not exist!
dpkg: error processing package kaltura-php7-cli (–configure):
subprocess installed post-installation script returned error exit status 1
Setting up kaltura-php7-memcache (3.0.9-2) …
/var/lib/dpkg/info/kaltura-php7-memcache.postinst: 9: /var/lib/dpkg/info/kaltura-php7-memcache.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-memcache (–configure):
subprocess installed post-installation script returned error exit status 127
Setting up kaltura-php7-xsl (7.0.0-9) …
/var/lib/dpkg/info/kaltura-php7-xsl.postinst: 32: /var/lib/dpkg/info/kaltura-php7-xsl.postinst: /opt/kaltura/bin/php7enmod: not found
dpkg: error processing package kaltura-php7-xsl (–configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
kaltura-php7-gd
kaltura-php7-ssh2
kaltura-php7-curl
kaltura-php7-mcrypt
kaltura-php7-cli
kaltura-php7-memcache
kaltura-php7-xsl "

When using Ubuntu 16.04, you shouldn’t install the kaltura-php7 packages. Ubuntu 16.04 already includes PHP7 packages from the official repo.
Please remove all kaltura-php7 packages you may have installed and follow:

I have removed all kaltura-php7 packages and tried to install kaltura again but we are getting the below error:
Logs:
kaltura-front is already installed at the requested version (12.19.0-1)
kaltura-front is already installed at the requested version (12.19.0-1)
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

The following NEW packages will be installed:
kaltura-sphinx libodbc1{a}
0 packages upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/1,944 kB of archives. After unpacking 16.9 MB will be used.
Selecting previously unselected package libodbc1:amd64.
dpkg: warning: files list file for package ‘kaltura-php7-gd’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-ssh2’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-curl’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-mcrypt’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-gmp’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-cli’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-apcu’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-memcache’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-xsl’ missing; assuming package has no files currently installed
dpkg: warning: files list file for package ‘kaltura-php7-common’ missing; assuming package has no files currently installed
(Reading database … 266736 files and directories currently installed.)
Preparing to unpack …/libodbc1_2.3.1-4.1_amd64.deb …
Unpacking libodbc1:amd64 (2.3.1-4.1) …
Selecting previously unselected package kaltura-sphinx.
Preparing to unpack …/kaltura-sphinx_2.2.1-4+b1_amd64.deb …
Unpacking kaltura-sphinx (2.2.1-4+b1) …
Processing triggers for libc-bin (2.23-0ubuntu9) …
Processing triggers for systemd (229-4ubuntu19) …
Processing triggers for ureadahead (0.100.0-19) …
Setting up libodbc1:amd64 (2.3.1-4.1) …
Setting up kaltura-sphinx (2.2.1-4+b1) …
ERROR:could not find /opt/kaltura/bin/kaltura-functions.rc so, exiting…dpkg: error processing package kaltura-sphinx (–configure):
subprocess installed post-installation script returned error exit status 3
Processing triggers for libc-bin (2.23-0ubuntu9) …
Processing triggers for systemd (229-4ubuntu19) …
Processing triggers for ureadahead (0.100.0-19) …
Errors were encountered while processing:
kaltura-sphinx
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package. Trying to recover:
Setting up kaltura-sphinx (2.2.1-4+b1) …
ERROR:could not find /opt/kaltura/bin/kaltura-functions.rc so, exiting…dpkg: error processing package kaltura-sphinx (–configure):
subprocess installed post-installation script returned error exit status 3
Processing triggers for libc-bin (2.23-0ubuntu9) …
Errors were encountered while processing:
kaltura-sphinx

Your first serious issue is here:

/opt/kaltura/bin/kaltura-functions.rc is provided by the kaltura-postinst package. Why happens when you run:
# aptitude install kaltura-postinst
?
Also,

implies you did not properly remove the kaltura-php7 packages.

Hi jess,
To make the process easier, we tried to re-install ubuntu and start the installation process from the beginning. But while installing we received a pop up saying “Your mysql settings are incorrect”.
and the installation process terminated with the following error:

Error:
Reading state information… Done
The following NEW packages will be installed:
kaltura-db
0 upgraded, 1 newly installed, 0 to remove and 266 not upgraded.
Need to get 4,444 B of archives.
After this operation, 8,192 B of additional disk space will be used.
Get:1 http://installrepo.kaltura.org/repo/apt/xenial lynx/main amd64 kaltura-db all 12.15.0-1+b4 [4,444 B]
Fetched 4,444 B in 1s (4,125 B/s)
Preconfiguring packages …
Selecting previously unselected package kaltura-db.
(Reading database … 224069 files and directories currently installed.)
Preparing to unpack …/kaltura-db_12.15.0-1+b4_all.deb …
Unpacking kaltura-db (12.15.0-1+b4) …
Setting up kaltura-db (12.15.0-1+b4) …

Checking MySQL version…
innodb_log_file_size => 32M
Please adjust your settings manually and re-run.
dpkg: error processing package kaltura-db (–configure):
subprocess installed post-installation script returned error exit status 8
Errors were encountered while processing:
kaltura-db
E: Sub-process /usr/bin/dpkg returned an error code (1)

Please tell us how to proceed now as we need to finish the installation process by today. So we will be online for next 1 hour, please reply asap.
Thanks

With reference to your previous reply;
Yes. Make sure to provide a valid, resolvable hostname for both your DB and Apache.
The Apache virtual host/service URL/endpoint has to be accessible from both within the server and any external machine you intend to play videos from or manage the server.

We don’t know the exact procedure for resolving the hostname. Can you please provide us the necessary details and elaborate the procedure.
We used “localhost” as the DB hostname and the service url is “http://infy1-OptiPlex-380”. These values were automatically inserted into the pop ups during the time of installation. We did not make any changes or customizations.

In regards to hostnames, using localhost for MySQL when deploying an all in one Kaltura Server is fine, in a cluster, all front and batch nodes need to be able to reach the MySQL server and so, for a cluster, localhost will not work.

As for infy1-OptiPlex-380, if there is a DNS record for that in the DNS server your hosts use for domain resolution, that should be fine, otherwise, you will need to add a record in your hosts file so that infy1-OptiPlex-380 is resolved. On Linux and Mac machines the file to edit is /etc/hosts on Windows, it is under a different location, you can Google it.

As for “Please adjust your settings manually and re-run.” see my reply here: