When you try to install Tizen Studio on a recent Ubuntu version (and possibly other distributions) you might run into problem that the Emulator package wants you to install packages that are not available for your version of the distribution.
The problematic packages were the following for me:
- libjpeg-turbo8
- libpng12-0
The Package manager will complain with a message like the following:
The problem is that even if you find the .deb packages somewhere, you will not be able to install them as they have been superseded by new versions that will prevent you from using these old packages.
The solution
- Trick the package manager to install the Emulator package without requiring the problematic packages
- Make the emulator work by providing it the libraries from the packages
Trick the Package Manager
The package dependencies are defined in http://download.tizen.org/sdk/tizenstudio/official/pkg_list_ubuntu-64
So we want to remove all occurrences of libpng12-0
and libjpeg-turbo8
. We obviously cannot edit the file on the server and we do not want to mirror the whole package repository, so we are going to use an HTTP proxy that rewrites the file on-the-fly: https://mitmproxy.org/
- Install mitmproxy:
sudo apt-get install mitmproxy
- Download
pkg_list_ubuntu-64
and remove the problematic dependencies from it. - Run
mitmproxy -s script.py --set stream_large_bodies=30
where script.py is the one below - Configure the Tizen Package manager to use
http://localhost:8080
as proxy - Install the packages you wanted to install
# script.py
from mitmproxy import http
def request(flow):
if flow.request.pretty_url.endswith("pkg_list_ubuntu-64"):
with open('/path/to/pkg_list_ubuntu-64', 'r') as f:
txt = f.read()
flow.response = http.HTTPResponse.make(
200,
txt,
{"Content-Type": "text/plain"})
Fix the installation
Now that you have the emulator installed you will notice that it will not run without libpng12.so.0
which was supposed to come from the package we did not install. So we need to download the .deb with the library and copy it into platforms/tizen-5.5/common/emulator/bin
or potentially elsewhere if you installed a different package.
JavaFX issues
I also had problems with missing JavaFX dependencies. This is unrelated to the package problems, but it is also a problem of newer software: the newer OpenJDK packages come apparently without JavaFX.
I fixed this by installing openjfx via sudo apt-get install openjfx
and changing scripts such as studio/platforms/tizen-5.5/common/emulator/bin
to use the JavaFX JARs from /usr/share/openjfx