Sunday, December 10, 2017

Genymotion and Virtualbox not working properly after windows 10 update Build 16299

After windows 10 automatic update into cersion 10.0.16299 Build 16299, Genymotion won't start and Virtualbox doesnot working properly.

Symptom:
  1. Genymotion (Version 2.11), will stop during loading plugin and generate genymotion-log.zip log file under folder c:\user\[username]\genymotion-log.zip.
  2. Virtualbox (Version 5.2.2 r119230) -> Global Tools -> Host Network Manager, always fail to create VirtualBox Host-Only Ethernet Adapter. There is no any VirtualBox Host-Only Ethernet Adapter (empty)
IMO, the cause of this problem, Virtualbox Network Driver does not configure properly after windows update.

Solution:
Uninstall your Virtualbox, restart your windows and reinstall your Virtualbox.

Note your existing virtual device will be safe (untouch).




Thursday, December 7, 2017

Android Studio 3 on Debian Stretch: Fail to run AVD

Symptoms:
  1. Emulator: libGL error: unable to load driver: r600_dri.so
  2. Emulator: libGL error: driver pointer missing
  3. ...etc

To solve this issue:
  1. 1. backup your libstdc++ included in android sdk.
    ~/android-sdk-linux/emulator/lib64/libstdc++/libstdc++.so.6
    $ mv libstdc++.so.6 libstdc++.so.6.bak
  2. make link libstdc++.so.6 from debian stretch
    $ ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6
References:
  1. https://android.stackexchange.com/questions/145437/reinstall-avd-on-ubuntu-16-04
  2. https://stackoverflow.com/questions/36189393/android-studio-avd-error-launching

Thursday, November 16, 2017

Upgrade JDK 8 to JDK 9 and steps to fix your application in Eclipse Oxygen

To install JDK 9 in windows (tested on Windows 10)
  1. Download JDK 9 from http://www.oracle.com/technetwork/java/javase/downloads/index.html. Current version when this note created is JDK 9.0.1.
  2. Follow installation instruction.
  3. In window system environment, set JAVA_HOME to JDK 9
    for example: JAVA_HOME = JAVA_HOME=C:\Java\jdk-9.0.1\
  4. In window system environment, set to path to JDK 9 binary folder
    for example Path=...;C:\Java\jdk-9.0.1\bin;...
To Install JDK 9 in Debian Stretch
  1. Add Backport repository to /etc/apt/sources.list
    # BACKPORT
    deb http://ftp.de.debian.org/debian stretch-backports main
  2. Install JDK 9 straight forward
    # apt-get install openjdk-9-jdk openjdk-9-jdk-headless openjdk-9-jre openjdk-9-jre-headless
Note:
  1. You can remove your JDK 8
  2. Android Studio 3 and earlier does not work with JDK 9. You may used JDK 8 that bundled in Android Studio 3 (tested on Android Studio 3 in Windows 10).
Your Eclipse Oxygen (version >= 1a) may be find with JDK 9, but you need to migrating your application library from JDK 8 to JDK 9 with these steps (tested on Windows 10):
  1. "Package Explorer" right click -> Properties
  2. "Java Build Path" -> Library (tab)
  3. Remove JRE System Library [JavaSE-1.8]
  4. Click "Add Library" botton
  5. "Add JRE System Library" -> Next -> "Workspace default JRE (jre-9.0.1)" -> Finish
  6. Click Apply botton
  7. Click Apply and Close botton 

Reference:

  • http://wiki.eclipse.org/Configure_Eclipse_for_Java_9 



Tuesday, October 17, 2017

Centos 7: install epel and speedtest-cli

To install epel

# yum install epel-release

To install speedtest-cli

# yum install python2-speedtest-cli

To run speedtest-cli

# speedtest-cli
Retrieving speedtest.net configuration...
Testing from PT Media Andalan Nusa (103.253.113.233)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by CBN (Jakarta) [0.74 km]: 3.059 ms
Testing download speed................................................................................
Download: 236.99 Mbit/s
Testing upload speed....................................................................................................
Upload: 186.53 Mbit/s


References:
  • https://www.cyberciti.biz/faq/installing-rhel-epel-repo-on-centos-redhat-7-x/

Sunday, October 8, 2017

odoo 10: installing on Debian Stretch

Install from odoo repository not work

# wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
# echo "deb http://nightly.odoo.com/10.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
# apt-get update && apt-get install odoo
# apt-get install odoo
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 odoo : Depends: python-pypdf but it is not installable
E: Unable to correct problems, you have held broken packages.

We install python-pypdf 1.13 using pip
# apt-get install python-pip
# pip install pyPdf


Instructions bellow may harm your system:
"The purpose of a fake package is to trick dpkg and apt into believing that some package is installed even though it's only an empty shell. This allows satisfying dependencies on a package when the corresponding software was installed outside the scope of the packaging system. Such a method works, but it should still be avoided whenever possible, since there is no guarantee that the manually installed software behaves exactly like the corresponding package would and other packages depending on it would not work properly."

We need to build fake debian package for python-pypdf. Install all requirement tools
# apt-get install equivs  dh-make

Create directory python-pypdf
# mkdir python-pypdf
# cd python-pypdf/

Optional to create default email dan full name for our fake python-pypdf
# export EMAIL="youremail@example.com"
# export DEBFULLNAME="your_full_name"

Create our fake python-pypdf configuration
# equivs-control python-pypdf

Edit file python-pypdf
# vi python-pypdf
### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: python
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2
Package: python-pypdf
Version: 1.13
Maintainer: your_full_name<youremail@example.com>
# Pre-Depends: <comma-separated list of packages>
# Depends: <comma-separated list of packages>
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
# Provides: <comma-separated list of packages>
# Replaces: <comma-separated list of packages>
# Architecture: all
# Multi-Arch: <one of: foreign|same|allowed>
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files for the doc directory>
# Files: <pair of space-separated paths; First is file to include, second is destination>
#  <more pairs, if there's more than one file to include. Notice the starting space>
Description: fake package to provide python-pypdf
 python-pypdf will need to be installed with pip
 .
 python-pypdf2 does not provide python-pypdf

We can build our fake python-pypdf and install it
# equivs-build python-pypdf
# dpkg -i python-pypdf_1.13_all.deb

Now you can install odoo 10
# apt-get install odoo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  odoo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 58.7 MB of archives.
After this operation, 401 MB of additional disk space will be used.
Get:1 http://nightly.odoo.com/10.0/nightly/deb ./ odoo 10.0.20171005 [58.7 MB]
Fetched 58.7 MB in 2min 32s (385 kB/s)
Selecting previously unselected package odoo.
(Reading database ... 64960 files and directories currently installed.)
Preparing to unpack .../odoo_10.0.20171005_all.deb ...
Unpacking odoo (10.0.20171005) ...
Processing triggers for systemd (232-25+deb9u1) ...
[144408.689602] systemd[1]: apt-daily.timer: Adding 4h 39min 11.670524s random time.
Setting up odoo (10.0.20171005) ...
[144409.728850] systemd[1]: apt-daily.timer: Adding 10h 55min 37.336482s random time.
[144409.893345] systemd[1]: apt-daily.timer: Adding 9h 24min 36.399757s random time.
Processing triggers for systemd (232-25+deb9u1) ...
[144410.109266] systemd[1]: apt-daily.timer: Adding 11h 22min 7.421289s random time.


References:
  • https://github.com/odoo/odoo/issues/17002
  • https://debian-handbook.info/browse/stable/sect.building-first-package.html
  • http://nightly.odoo.com/
  • https://www.odoo.com/documentation/10.0/setup/install.html