Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

CUBRID Perl Driver Build Guide


This document describes the installation and configuration of DBD::cubrid, a Perl DBI driver for CUBRID database. Before reading on, make sure that you have the prerequisites installed: Perl, CUBRID and DBI. For details see the Prerequisites section below.

Depending on the version of your Perl, it may be possible to use a binary distribution of DBD::CUBRID. If possible, this is recommended. Otherwise you need to install it from the sources. If so, you will definitely need a C compiler. Installation from sources is described in separate Installation from Source section below.


  • Perl

    Preferrably a version of Perl, that comes preconfigured with your system. For example, all Linux and FreeBSD distributions come with Perl. For Windows, ActivePerl is recommended, see for details.


    You need install the actual CUBRID database management system. You can download CUBRID here. If you want to install from source code an build it, see How to Download CUBRID Source Code and Build it for details.

  • DBI

    DBD::cubrid is a DBI driver, hence you need DBI. The DBI home page is
    The DBI 1.61 or higher version is needed in Cubrid Perl driver.

    DBI Installation from source:

    1. Download the DBI-1.x.x.tar.gz from
    2. Unpack the source code.
      tar -zxf DBI-1.x.x.tar.gz
    3. Build and install.
      perl Makefile.PL
      make install

    Register Cubrid driver into
    Edit the file installed in the above step, and add the red line below. For example: perl-5.16.1/lib/site_perl/5.16.1/x86_64-linux/
     my $dbd_prefix_registry = {
        sys_         => { class => 'DBD::Sys',            },
        tdat_        => { class => 'DBD::Teradata',       },
        tmpl_        => { class => 'DBD::Template',       },
        tmplss_      => { class => 'DBD::TemplateSS',     },
        tree_        => { class => 'DBD::TreeData',       },
        tuber_       => { class => 'DBD::Tuber',          },
        uni_         => { class => 'DBD::Unify',          },
        vt_          => { class => 'DBD::Vt',             },
        wmi_         => { class => 'DBD::WMI',            },
        x_           => { }, # for private use
        xbase_       => { class => 'DBD::XBase',          },
        xl_          => { class => 'DBD::Excel',          },
        yaswi_       => { class => 'DBD::Yaswi',          },
        cubrid_      => { class => 'DBD::cubrid',         },
  • C compiler

    A C compiler is only required, if you install from source. In most cases there are binary distributions of DBD::cubrid available. However, if you need a C compiler, make sure, that it is the same C compiler that was used for compiling Perl and CUBRID. Otherwise you will almost definitely encounter problems because of differences in the underlying C runtime libraries.

    In the worst case, this might mean to compile Perl and CUBRID yourself. But believe me, experience shows that a lot of problems are fixed this way.

Installation from Source

So you need to install from sources. If you are lucky, the Perl module CPAN will do all for you. Otherwise you will need to do a manual installation. Some of you, in particular system administrators of multiple sites, will choose automatic installation. All of these installation types have an own section.

CPAN installation

Install the latest version of DBD::cubrid

Installation of DBD::cubrid can be incredibly easy:

$ cpan
cpan> install DBD::cubrid

If you are using the CPAN module for the first time, just answer the questions by accepting the defaults which are fine in most cases. If you are using an older version of Perl, you might instead need a

$  perl -MCPAN -e shell
cpan> install DBD::cubrid

If you cannot get the CPAN module working, you might try to manual installation.

Install a givern version of DBD::cubrid

By default, CPAN will install the latest release of a module. If you want to install a given release, you can follow the below steps:

1. List releases.

you can use the ls command to get this path listed.

cpan> ls CUBRID

The result maybe like the below. It shows which versions are available.

     638 2011-10-21 CUBRID/DBD-cubrid-
   25043 2011-12-02 CUBRID/DBD-cubrid-
     643 2012-01-20 CUBRID/DBD-cubrid-
   71812 2012-01-20 CUBRID/DBD-cubrid-
     643 2012-03-26 CUBRID/DBD-cubrid-
   71956 2012-03-26 CUBRID/DBD-cubrid-
     643 2012-05-23 CUBRID/DBD-cubrid-
   71926 2012-11-16 CUBRID/DBD-cubrid-
     643 2012-09-21 CUBRID/DBD-cubrid-
   73257 2012-10-15 CUBRID/DBD-cubrid-

2. Install the given version.

You have to specify the partial path starting with the author id(uppercased) to the tarball you wish to install. The author id of DBD-cubrid is cubrid. The tarball file name is DBD-cubrid-<version>.tar.gz. For example, you want to install version

cpan> install CUBRID/DBD-cubrid-

If you cannot get the CPAN module working, you might try to manual installation.

Manual installation

For a manual installation you need to fetch the DBD::cubrid source distribution. The latest version is always available from

The name is typically something like


The archive needs to be extracted. On Windows you may use a tool like WinZip, on Unix you type

  tar zxvf DBD-cubrid-X.X.X.tar.gz

This will create a subdirectory RB-X.X.X. Enter this subdirectory and type

  perl Makefile.PL
  make test

(On Windows you may need to replace ``make'' with ``nmake'' or ``dmake''.)If the tests seem to look fine, you may continue with

  make install


Finally, if everything else fails, you are not alone. Post a question on our Q&A site and we will help you out.

comments powered by Disqus
Page info
viewed 11003 times
translations en
posted 6 years ago by
updated 4 years ago by
View revisions
Share this article