Difference between revisions of "How to run OpenKore"

From OpenKore Wiki
Jump to navigation Jump to search
Line 1: Line 1:
=(Un)supported Linux distributions and operating systems=
+
== (Un)supported Linux distributions and operating systems ==
 
 
 
OpenKore is known to not work on some live CD distributions, because they do not ship enough software. Distributions on which OpenKore does not work include:
 
OpenKore is known to not work on some live CD distributions, because they do not ship enough software. Distributions on which OpenKore does not work include:
  
Line 15: Line 14:
 
* Windows 2000, XP, 2003
 
* Windows 2000, XP, 2003
  
=Requirements=
 
  
 +
== Requirements ==
 
You must first make sure that you have several things installed before you can run OpenKore.
 
You must first make sure that you have several things installed before you can run OpenKore.
  
==C/C++ compiler==
+
=== C/C++ compiler ===
 
+
----
 
You must have a C and C++ compiler installed. GCC is installed by default on many Linux distributions, but apparently some people install Linux without GCC.
 
You must have a C and C++ compiler installed. GCC is installed by default on many Linux distributions, but apparently some people install Linux without GCC.
  
 
To check whether you have a C++ compiler installed, open a terminal and type:
 
To check whether you have a C++ compiler installed, open a terminal and type:
  
g++ -v
+
g++ -v
  
 
If you don't get an error, then you have a C++ compiler, and you can skip to the next paragraph. If not, read the table below.
 
If you don't get an error, then you have a C++ compiler, and you can skip to the next paragraph. If not, read the table below.
  
* Fedora/RHEL/CentOS
+
{|border="1" cellpadding="2" cellspacing="1"
    Open a terminal and type:
+
|- style=background-color:#F9F9F9;
    su -c 'yum install gcc-c++'
+
!OS/distribution
 +
!Instructions
 +
|-
 +
|align=center|Fedora/RHEL/CentOS
 +
|Open a terminal and type:
 +
su -c 'yum install gcc-c++'
 +
|-
 +
|align=center|Ubuntu
 +
|Open a terminal and type:
 +
sudo apt-get install build-essential g++
 +
|-
 +
|align=center|Debian
 +
|Open a terminal and type:
 +
su -c 'apt-get install g++'
 +
|-
 +
|align=center|(Open)Suse
 +
|Open a terminal and type:
 +
su -c 'yast -i gcc-c++'
 +
|-
 +
|align=center|Other Linux distributions
 +
|Look in your distribution's CD for packages called gcc, and gcc-c++ or g++.
 +
|-
 +
|align=center|MacOS X
 +
|Read http://www.tech-recipes.com/mac_system_administration_tips726.html
 +
|}
  
* Ubuntu
 
    Open a terminal and type:
 
    sudo apt-get install build-essential g++
 
  
* Debian
+
=== Perl ===
    Open a terminal and type:
+
----
    su -c 'apt-get install g++'
 
  
* (Open)Suse
+
You must have Perl '''5.10.1''' or newer installed. Earlier versions might not be supported! To check whether you have Perl installed (and whether it is the correct version), type:
    Open a terminal and type:
 
    su -c 'yast -i gcc-c++'
 
  
* Other Linux distributions
+
perl -v | grep perl
    Look in your distribution's CD for packages called gcc, and gcc-c++ or g++.
 
 
 
* MacOS X
 
    Read http://www.tech-recipes.com/mac_system_administration_tips726.html
 
 
 
==Perl==
 
 
 
You must have Perl 5.10.1 or newer installed. Earlier versions might not be supported! To check whether you have Perl installed (and whether it is the correct version), type:
 
 
 
perl -v | grep perl
 
  
 
If you see the Perl version number, then it is installed. If you get an error, then it is not installed, and you should read the following table.
 
If you see the Perl version number, then it is installed. If you get an error, then it is not installed, and you should read the following table.
  
* Fedora/RHEL/CentOS
+
{|border="1" cellpadding="2" cellspacing="1"
    Open a terminal and type:
+
|- style=background-color:#F9F9F9;
    su -c 'yum install perl'
+
!OS/distribution
 
+
!Instructions
* Ubuntu
+
|-
    Open a terminal and type:
+
|align=center|Fedora/RHEL/CentOS
    sudo apt-get install perl
+
|Open a terminal and type:
 
+
su -c 'yum install perl'
* Debian
+
|-
    Open a terminal and type:
+
|align=center|Ubuntu
    su -c 'apt-get install perl-base'
+
|Open a terminal and type:
 +
sudo apt-get install perl
 +
|-
 +
|align=center|Debian
 +
|Open a terminal and type:
 +
su -c 'apt-get install perl-base'
 +
|-
 +
|align=center|Other Linux distributions
 +
|Download it from http://www.perl.org/
 +
|-
 +
|align=center|FreeBSD
 +
|Open a terminal and type:
 +
cd /usr/ports/lang/perl5.8
 +
su -c 'make install'
 +
|-
 +
|align=center|MacOS X
 +
|Read http://developer.apple.com/internet/opensource/perl.html
 +
|-
 +
|align=center|Windows
 +
|Install [http://www.activestate.com/activeperl/ ActivePerl]
 +
|}
  
* Other Linux distributions
 
    Download it from http://www.perl.org/
 
 
* FreeBSD
 
    Open a terminal and type:
 
    cd /usr/ports/lang/perl5.8
 
    su -c 'make install'
 
 
* MacOS X
 
    Read http://developer.apple.com/internet/opensource/perl.html
 
 
* Windows
 
    Install [http://www.activestate.com/activeperl/ ActivePerl]
 
 
==Perl module: Time::HiRes==
 
  
 +
=== Perl module: Time::HiRes ===
 +
----
 
You need the Time::HiRes Perl module. You can check whether you already have it by typing
 
You need the Time::HiRes Perl module. You can check whether you already have it by typing
  
perl -e 'use Time::HiRes;'
+
perl -e 'use Time::HiRes;'
  
 
If nothing happens, then it is installed, and you can skip to the next paragraph. If you get an error, then it is not installed, and you should read the following table.
 
If nothing happens, then it is installed, and you can skip to the next paragraph. If you get an error, then it is not installed, and you should read the following table.
OS/distribution Instructions
 
Fedora/RHEL/CentOS Open a terminal and type:
 
 
su -c 'yum install perl-Time-HiRes'
 
 
Debian Open a terminal and type:
 
  
su -c 'apt-get install libtime-hires-perl'
+
{|border="1" cellpadding="2" cellspacing="1"
 +
|- style=background-color:#F9F9F9;
 +
!OS/distribution
 +
!Instructions
 +
|-
 +
|align=center|Fedora/RHEL/CentOS
 +
|Open a terminal and type:
 +
su -c 'yum install perl-Time-HiRes'
 +
|-
 +
|align=center|Debian
 +
|Open a terminal and type:
 +
su -c 'apt-get install libtime-hires-perl'
 +
|-
 +
|align=center|FreeBSD
 +
|Open a terminal and type:
 +
cd /usr/ports/devel/p5-Time-HiRes
 +
su -c 'make install'
 +
|-
 +
|align=center|Other operating systems or Linux distributions
 +
|Download the Time::HiRes source code from CPAN and compile and install it.
 +
|}
  
FreeBSD Open a terminal and type:
 
 
cd /usr/ports/devel/p5-Time-HiRes
 
su -c 'make install'
 
 
Other operating systems or Linux distributions Download the Time::HiRes source code from CPAN and compile and install it.
 
 
==Perl module: Compress::Zlib==
 
  
 +
=== Perl module: Compress::Zlib ===
 +
----
 
You need the Compress::Zlib Perl module. You can check whether you already have it by typing
 
You need the Compress::Zlib Perl module. You can check whether you already have it by typing
  
perl -e 'use Compress::Zlib;'
+
perl -e 'use Compress::Zlib;'
  
 
If nothing happens, then it is installed, and you can skip to the next paragraph. If you get an error, then it is not installed, and you should read the following table.
 
If nothing happens, then it is installed, and you can skip to the next paragraph. If you get an error, then it is not installed, and you should read the following table.
OS/distribution Instructions
 
Ubuntu Open a terminal and type:
 
  
sudo apt-get install libcompress-zlib-perl
+
{|border="1" cellpadding="2" cellspacing="1"
 +
|- style=background-color:#F9F9F9;
 +
!OS/distribution
 +
!Instructions
 +
|-
 +
|align=center|Ubuntu
 +
|Open a terminal and type:
 +
sudo apt-get install libcompress-zlib-perl
 +
|-
 +
|align=center|FreeBSD
 +
|Open a terminal and type:
 +
cd /usr/ports/archivers/p5-Compress-Zlib
 +
su -c 'make install'
 +
|-
 +
|align=center|Other operating systems or Linux distributions
 +
|Download the Compress::Zlib source code from CPAN and compile and install it.
 +
|}
  
FreeBSD Open a terminal and type:
 
 
cd /usr/ports/archivers/p5-Compress-Zlib
 
su -c 'make install'
 
 
Other operating systems or Linux distributions Download the Compress::Zlib source code from CPAN and compile and install it.
 
 
==GNU readline==
 
  
 +
=== GNU readline ===
 +
----
 
GNU readline and its associated development package must be installed. You need at least version 5.0. To check whether you have a recent enough version of GNU readline, follow the following instructions:
 
GNU readline and its associated development package must be installed. You need at least version 5.0. To check whether you have a recent enough version of GNU readline, follow the following instructions:
  
  1. Copy and past the following text into a text editor:
+
# Copy and past the following text into a text editor:
 
 
      #include <stdio.h>
 
      #include <readline/readline.h>
 
      #if !defined(RL_READLINE_VERSION)
 
      #error "You do not have the GNU readline development headers installed!"
 
      #elif RL_READLINE_VERSION < 0x0500
 
      #error "Your version of GNU readline is too old. Please install version 5.0 or higher."
 
      #endif
 
  
 +
#include <stdio.h>
 +
#include <readline/readline.h>
 +
#if !defined(RL_READLINE_VERSION)
 +
      #error "You do not have the GNU readline development headers installed!"
 +
#elif RL_READLINE_VERSION < 0x0500
 +
      #error "Your version of GNU readline is too old. Please install version 5.0 or higher."
 +
#endif
  
 +
'''Note.''' The file must end with an empty line)
  
      (note that the file must end with an empty line)
+
# Save the file as readlinetest.c in your home folder.
  2. Save the file as readlinetest.c in your home folder.
+
# Open a terminal and type:
  3. Open a terminal and type:
 
  
      gcc -c ~/readlinetest.c
+
gcc -c ~/readlinetest.c
  
 
If you do not see any output, then that means you have GNU readline correctly installed, and you can skip to the next paragraph. If you do see an error message, then read the following table.
 
If you do not see any output, then that means you have GNU readline correctly installed, and you can skip to the next paragraph. If you do see an error message, then read the following table.
OS/distribution Instructions
 
Fedora/RHEL/CentOS Open a terminal and type:
 
 
su -c 'yum install readline-devel'
 
 
Ubuntu Open a terminal and type:
 
  
sudo apt-get install libreadline5-dev
+
{|border="1" cellpadding="2" cellspacing="1"
 +
|- style=background-color:#F9F9F9;
 +
!OS/distribution
 +
!Instructions
 +
|-
 +
|align=center|Fedora/RHEL/CentOS
 +
|Open a terminal and type:
 +
su -c 'yum install readline-devel'
 +
|-
 +
|align=center|Ubuntu
 +
|Open a terminal and type:
 +
sudo apt-get install libreadline5-dev
 +
|-
 +
|align=center|Debian
 +
|Open a terminal and type:
 +
su -c 'apt-get install libreadline5-dev'
 +
|-
 +
|align=center|Other operating systems or Linux distributions
 +
|You must compile readline and install readline from source.
 +
|}
  
Debian Open a terminal and type:
 
  
su -c 'apt-get install libreadline5-dev'
+
# Download the readline source code from the GNU FTP. You should download the latest version (at the time this page is written, the latest version is readline-5.1.tar.gz). Save the file to your home folder.
 +
# Open a terminal, and type:
  
Other operating systems or Linux distributions You must compile readline and install readline from source.
+
tar xzvf readline-X.X.tar.gz && cd readline-X.X
  
  1. Download the readline source code from the GNU FTP. You should download the latest version (at the time this page is written, the latest version is readline-5.1.tar.gz). Save the file to your home folder.
+
Where X.X is the version of the file you downloaded/
  2. Open a terminal, and type:
 
  
      tar xzvf readline-X.X.tar.gz && cd readline-X.X
+
# Type:
 +
./configure && make && su -c 'make install'
  
      (where X.X is the version of the file you downloaded)
+
'''MacOS X note.''' Do not install Readline from Fink! That won't work.
  3. Type:
 
 
 
      ./configure && make && su -c 'make install'
 
 
 
MacOS X note: do not install Readline from Fink! That won't work.
 
 
 
FreeBSD
 
  
 
FreeBSD uses simple console interface that doesn't require Readline. But in the case it needed:
 
FreeBSD uses simple console interface that doesn't require Readline. But in the case it needed:
  
Open a terminal and type:
+
Open a terminal and type:
cd /usr/ports/devel/readline
+
cd /usr/ports/devel/readline
su -c 'make install'
+
su -c 'make install'
  
==Python==
 
  
 +
=== Python ===
 +
----
 
Python must be installed. To check whether you have it, type:
 
Python must be installed. To check whether you have it, type:
  
echo 'print "Python is installed"' | python
+
echo 'print "Python is installed"' | python
  
 
If you get the message "Python is installed", then Python is installed, and you can skip to the next paragraph. If Python is not installed, then read the following table.
 
If you get the message "Python is installed", then Python is installed, and you can skip to the next paragraph. If Python is not installed, then read the following table.
OS/distribution Instructions
 
Fedora/RHEL/CentOS Open a terminal and type:
 
  
su -c 'yum install python'
+
{|border="1" cellpadding="2" cellspacing="1"
 +
|- style=background-color:#F9F9F9;
 +
!OS/distribution
 +
!Instructions
 +
|-
 +
|align=center|Fedora/RHEL/CentOS
 +
|Open a terminal and type:
 +
su -c 'yum install python'
 +
|-
 +
|align=center|Ubuntu
 +
|Open a terminal and type:
 +
sudo apt-get install python
 +
|-
 +
|align=center|Debian
 +
|Open a terminal and type:
 +
su -c 'apt-get install python'
 +
|-
 +
|align=center|FreeBSD
 +
|Open a terminal and type
 +
cd /usr/ports/lang/python
 +
su -c 'make install'
 +
|-
 +
|align=center|MacOS X
 +
|Download Python here.
 +
|}
  
Ubuntu Open a terminal and type:
 
 
sudo apt-get install python
 
 
Debian Open a terminal and type:
 
 
su -c 'apt-get install python'
 
 
FreeBSD Open a terminal and type
 
 
cd /usr/ports/lang/python
 
su -c 'make install'
 
 
MacOS X Download Python here.
 
 
==Curl development libraries==
 
  
 +
=== Curl development libraries ===
 +
----
 
The Curl development libraries are needed to compile OpenKore. To check whether you have it, type:
 
The Curl development libraries are needed to compile OpenKore. To check whether you have it, type:
  
curl-config --version
+
curl-config --version
  
 
If you get "command not found" as error message, you need to install libcurl:
 
If you get "command not found" as error message, you need to install libcurl:
OS/distribution Instructions
 
Fedora/RHEL/CentOS Open a terminal and type:
 
 
su -c 'yum install curl-devel'
 
 
Ubuntu First, search for the libcurl package using the package manager. Open a terminal and type:
 
 
apt-cache search libcurl
 
  
 +
{|border="1" cellpadding="2" cellspacing="1"
 +
|- style=background-color:#F9F9F9;
 +
!OS/distribution
 +
!Instructions
 +
|-
 +
|align=center|Fedora/RHEL/CentOS
 +
|Open a terminal and type:
 +
su -c 'yum install curl-devel'
 +
|-
 +
|align=center|Ubuntu
 +
|First, search for the libcurl package using the package manager.
 +
Open a terminal and type:
 +
apt-cache search libcurl
 
Then install the latest version with this command:
 
Then install the latest version with this command:
 
+
sudo apt-get install libcurlx-dev
sudo apt-get install libcurlx-dev
+
Where 'x' is the version number as found by the 'apt-cache search' command.
 
+
|-
where 'x' is the version number as found by the 'apt-cache search' command.
+
|align=center|Debian
Debian First, search for the libcurl package using the package manager. Open a terminal and type:
+
|First, search for the libcurl package using the package manager.  
 
+
Open a terminal and type:
apt-cache search libcurl
+
apt-cache search libcurl
 
 
 
Then install the latest version with this command:
 
Then install the latest version with this command:
 +
su -c 'apt-get install libcurlx-dev'
 +
Where 'x' is the version number as found by the 'apt-cache search' command.
 +
|-
 +
|align=center|FreeBSD
 +
|Open a terminal and type:
 +
cd /usr/ports/ftp/curl
 +
su -c 'make install'
 +
|-
 +
|align=center|Other operating systems or Linux distributions
 +
|Install libcurl from source by downloading it from the Curl homepage.
 +
|}
  
su -c 'apt-get install libcurlx-dev'
 
  
where 'x' is the version number as found by the 'apt-cache search' command.
+
== Running OpenKore ==
FreeBSD Open a terminal and type:
 
 
 
cd /usr/ports/ftp/curl
 
su -c 'make install'
 
 
 
Other operating systems or Linux distributions Install libcurl from source by downloading it from the Curl homepage.
 
 
 
=Running OpenKore=
 
 
 
==Download==
 
  
 +
=== Download ===
 +
----
 
First, download the OpenKore source code. You may also want to download the default configuration/table files and the field pack if you haven't done so already.
 
First, download the OpenKore source code. You may also want to download the default configuration/table files and the field pack if you haven't done so already.
  
==Extract==
+
=== Extract ===
 
+
----
 
Extract the archives as instructed on the download page.
 
Extract the archives as instructed on the download page.
  
==Run==
+
=== Run ==
 
+
----
 
Open a terminal. Go the OpenKore folder. Type:
 
Open a terminal. Go the OpenKore folder. Type:
  
perl ./openkore.pl
+
perl ./openkore.pl
  
 
And you're done. OpenKore will automatically try to compile XSTools.so, an internally used library. If compilation fails, please check the Common problems. If you still cannot, report the error on our forum.
 
And you're done. OpenKore will automatically try to compile XSTools.so, an internally used library. If compilation fails, please check the Common problems. If you still cannot, report the error on our forum.
  
= Command line options =
+
== Command line options ==
 
 
 
; --control=PATHS
 
; --control=PATHS
 
: Directories with control files, delimited with ";"
 
: Directories with control files, delimited with ";"
 +
 
; --tables=PATHS
 
; --tables=PATHS
 
: Directories with table files, delimited with ";"
 
: Directories with table files, delimited with ";"
 +
 
; --plugins=PATHS
 
; --plugins=PATHS
 
: Directories with plugins, delimited with ";"
 
: Directories with plugins, delimited with ";"
 +
 
; --fields=PATH
 
; --fields=PATH
 
: Directory with field files
 
: Directory with field files
 +
 
; --logs=PATH
 
; --logs=PATH
 
: Directory where logs will be saved
 
: Directory where logs will be saved
 +
 
; --config=FILENAME
 
; --config=FILENAME
 +
 
; --mon_control=FILENAME
 
; --mon_control=FILENAME
 +
 
; --items_control=FILENAME
 
; --items_control=FILENAME
 +
 
; --shop=FILENAME
 
; --shop=FILENAME
 +
 
; --sys=FILENAME
 
; --sys=FILENAME
 
: Location of different control files
 
: Location of different control files
 +
 
; --char-log=FILENAME
 
; --char-log=FILENAME
 +
 
; --storage-log=FILENAME
 
; --storage-log=FILENAME
 
: Location of different log files
 
: Location of different log files
 +
 
; --interface=INTERFACE
 
; --interface=INTERFACE
 
: See [[:Category:Interfaces]]
 
: See [[:Category:Interfaces]]
 +
 
; --lockdown
 
; --lockdown
 
: Disable potentially insecure features
 
: Disable potentially insecure features
 +
 
; --no-connect
 
; --no-connect
 
: Initialize OpenKore, but do not connect to any servers
 
: Initialize OpenKore, but do not connect to any servers
 +
 
; --help
 
; --help
 
: Display help for command line options
 
: Display help for command line options
  
=Common problems=
 
  
==Missing headers==
+
== Common problems ==
  
 +
=== Missing headers ===
 +
----
 
Common reason why compilation fails is because of missing headers. Look in the compilation messages. Do you see a message somewhere that looks like this?
 
Common reason why compilation fails is because of missing headers. Look in the compilation messages. Do you see a message somewhere that looks like this?
  
foo.h: No such file or directory
+
foo.h: No such file or directory
  
 
If so, then that means you didn't install all the libraries that OpenKore needs! Please go through Preparation again.
 
If so, then that means you didn't install all the libraries that OpenKore needs! Please go through Preparation again.
  
==hash_fun.h==
+
==== hash_fun.h ====
 
+
----
 
In file included from src/auto/XSTools/utils/perl/Benchmark.xs:1:
 
In file included from src/auto/XSTools/utils/perl/Benchmark.xs:1:
 
src/auto/XSTools/utils/perl/../dense_hash_map.h:93:66: error: ext/hash_fun.h: No such file or directory
 
src/auto/XSTools/utils/perl/../dense_hash_map.h:93:66: error: ext/hash_fun.h: No such file or directory
Line 314: Line 379:
 
Open src/auto/XSTools/utils/sparseconfig.h, find:
 
Open src/auto/XSTools/utils/sparseconfig.h, find:
  
#define HASH_FUN_H <ext/hash_fun.h>
+
#define HASH_FUN_H <ext/hash_fun.h>
  
 
and replace with:
 
and replace with:
  
#define HASH_FUN_H <backward/hash_fun.h>
+
#define HASH_FUN_H <backward/hash_fun.h>
  
=Precompiled binaries=
 
  
 +
== Precompiled binaries ==
 
On Windows, you can use [http://misc.openkore.com precompiled binaries], which contain perl interpreter and all modules and libraries needed.
 
On Windows, you can use [http://misc.openkore.com precompiled binaries], which contain perl interpreter and all modules and libraries needed.

Revision as of 03:21, 15 December 2009

(Un)supported Linux distributions and operating systems

OpenKore is known to not work on some live CD distributions, because they do not ship enough software. Distributions on which OpenKore does not work include:

  • Knoppix
  • elxLinux

On the other hand, OpenKore is guaranteed to work on at least:

  • Fedora
  • Ubuntu
  • FreeBSD
  • MacOS X
  • Solaris 8
  • Windows 2000, XP, 2003


Requirements

You must first make sure that you have several things installed before you can run OpenKore.

C/C++ compiler


You must have a C and C++ compiler installed. GCC is installed by default on many Linux distributions, but apparently some people install Linux without GCC.

To check whether you have a C++ compiler installed, open a terminal and type:

g++ -v

If you don't get an error, then you have a C++ compiler, and you can skip to the next paragraph. If not, read the table below.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install gcc-c++'
Ubuntu Open a terminal and type:
sudo apt-get install build-essential g++
Debian Open a terminal and type:
su -c 'apt-get install g++'
(Open)Suse Open a terminal and type:
su -c 'yast -i gcc-c++'
Other Linux distributions Look in your distribution's CD for packages called gcc, and gcc-c++ or g++.
MacOS X Read http://www.tech-recipes.com/mac_system_administration_tips726.html


Perl


You must have Perl 5.10.1 or newer installed. Earlier versions might not be supported! To check whether you have Perl installed (and whether it is the correct version), type:

perl -v | grep perl

If you see the Perl version number, then it is installed. If you get an error, then it is not installed, and you should read the following table.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install perl'
Ubuntu Open a terminal and type:
sudo apt-get install perl
Debian Open a terminal and type:
su -c 'apt-get install perl-base'
Other Linux distributions Download it from http://www.perl.org/
FreeBSD Open a terminal and type:
cd /usr/ports/lang/perl5.8
su -c 'make install'
MacOS X Read http://developer.apple.com/internet/opensource/perl.html
Windows Install ActivePerl


Perl module: Time::HiRes


You need the Time::HiRes Perl module. You can check whether you already have it by typing

perl -e 'use Time::HiRes;'

If nothing happens, then it is installed, and you can skip to the next paragraph. If you get an error, then it is not installed, and you should read the following table.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install perl-Time-HiRes'
Debian Open a terminal and type:
su -c 'apt-get install libtime-hires-perl'
FreeBSD Open a terminal and type:
cd /usr/ports/devel/p5-Time-HiRes
su -c 'make install'
Other operating systems or Linux distributions Download the Time::HiRes source code from CPAN and compile and install it.


Perl module: Compress::Zlib


You need the Compress::Zlib Perl module. You can check whether you already have it by typing

perl -e 'use Compress::Zlib;'

If nothing happens, then it is installed, and you can skip to the next paragraph. If you get an error, then it is not installed, and you should read the following table.

OS/distribution Instructions
Ubuntu Open a terminal and type:
sudo apt-get install libcompress-zlib-perl
FreeBSD Open a terminal and type:
cd /usr/ports/archivers/p5-Compress-Zlib
su -c 'make install'
Other operating systems or Linux distributions Download the Compress::Zlib source code from CPAN and compile and install it.


GNU readline


GNU readline and its associated development package must be installed. You need at least version 5.0. To check whether you have a recent enough version of GNU readline, follow the following instructions:

  1. Copy and past the following text into a text editor:
#include <stdio.h>
#include <readline/readline.h>
	#if !defined(RL_READLINE_VERSION)
     	 #error "You do not have the GNU readline development headers installed!"
	#elif RL_READLINE_VERSION < 0x0500
     	 #error "Your version of GNU readline is too old. Please install version 5.0 or higher."
#endif

Note. The file must end with an empty line)

  1. Save the file as readlinetest.c in your home folder.
  2. Open a terminal and type:
gcc -c ~/readlinetest.c

If you do not see any output, then that means you have GNU readline correctly installed, and you can skip to the next paragraph. If you do see an error message, then read the following table.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install readline-devel'
Ubuntu Open a terminal and type:
sudo apt-get install libreadline5-dev
Debian Open a terminal and type:
su -c 'apt-get install libreadline5-dev'
Other operating systems or Linux distributions You must compile readline and install readline from source.


  1. Download the readline source code from the GNU FTP. You should download the latest version (at the time this page is written, the latest version is readline-5.1.tar.gz). Save the file to your home folder.
  2. Open a terminal, and type:
tar xzvf readline-X.X.tar.gz && cd readline-X.X

Where X.X is the version of the file you downloaded/

  1. Type:
./configure && make && su -c 'make install'

MacOS X note. Do not install Readline from Fink! That won't work.

FreeBSD uses simple console interface that doesn't require Readline. But in the case it needed:

Open a terminal and type:
cd /usr/ports/devel/readline
su -c 'make install'


Python


Python must be installed. To check whether you have it, type:

echo 'print "Python is installed"' | python

If you get the message "Python is installed", then Python is installed, and you can skip to the next paragraph. If Python is not installed, then read the following table.

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install python'
Ubuntu Open a terminal and type:
sudo apt-get install python
Debian Open a terminal and type:
su -c 'apt-get install python'
FreeBSD Open a terminal and type
cd /usr/ports/lang/python
su -c 'make install'
MacOS X Download Python here.


Curl development libraries


The Curl development libraries are needed to compile OpenKore. To check whether you have it, type:

curl-config --version

If you get "command not found" as error message, you need to install libcurl:

OS/distribution Instructions
Fedora/RHEL/CentOS Open a terminal and type:
su -c 'yum install curl-devel'
Ubuntu First, search for the libcurl package using the package manager.

Open a terminal and type:

apt-cache search libcurl

Then install the latest version with this command:

sudo apt-get install libcurlx-dev

Where 'x' is the version number as found by the 'apt-cache search' command.

Debian First, search for the libcurl package using the package manager.

Open a terminal and type:

apt-cache search libcurl

Then install the latest version with this command:

su -c 'apt-get install libcurlx-dev'

Where 'x' is the version number as found by the 'apt-cache search' command.

FreeBSD Open a terminal and type:
cd /usr/ports/ftp/curl
su -c 'make install'
Other operating systems or Linux distributions Install libcurl from source by downloading it from the Curl homepage.


Running OpenKore

Download


First, download the OpenKore source code. You may also want to download the default configuration/table files and the field pack if you haven't done so already.

Extract


Extract the archives as instructed on the download page.

= Run


Open a terminal. Go the OpenKore folder. Type:

perl ./openkore.pl

And you're done. OpenKore will automatically try to compile XSTools.so, an internally used library. If compilation fails, please check the Common problems. If you still cannot, report the error on our forum.

Command line options

--control=PATHS
Directories with control files, delimited with ";"
--tables=PATHS
Directories with table files, delimited with ";"
--plugins=PATHS
Directories with plugins, delimited with ";"
--fields=PATH
Directory with field files
--logs=PATH
Directory where logs will be saved
--config=FILENAME
--mon_control=FILENAME
--items_control=FILENAME
--shop=FILENAME
--sys=FILENAME
Location of different control files
--char-log=FILENAME
--storage-log=FILENAME
Location of different log files
--interface=INTERFACE
See Category:Interfaces
--lockdown
Disable potentially insecure features
--no-connect
Initialize OpenKore, but do not connect to any servers
--help
Display help for command line options


Common problems

Missing headers


Common reason why compilation fails is because of missing headers. Look in the compilation messages. Do you see a message somewhere that looks like this?

foo.h: No such file or directory

If so, then that means you didn't install all the libraries that OpenKore needs! Please go through Preparation again.

hash_fun.h


In file included from src/auto/XSTools/utils/perl/Benchmark.xs:1: src/auto/XSTools/utils/perl/../dense_hash_map.h:93:66: error: ext/hash_fun.h: No such file or directory

Open src/auto/XSTools/utils/sparseconfig.h, find:

#define HASH_FUN_H <ext/hash_fun.h>

and replace with:

#define HASH_FUN_H <backward/hash_fun.h>


Precompiled binaries

On Windows, you can use precompiled binaries, which contain perl interpreter and all modules and libraries needed.