Feed on
Posts
Comments

Sejak tadi pagi belum Sudah nemu solusi cara install mysql-5.0.51 (mysql50-client & mysql50-server) via ports di FreeBSD 4.10 Stable. Emang OS servernya sudah agak uzur. Sebelumnya database yang berjalan di server ini adalah mysql-4.0. Berikut informasinya

-su-2.05b# uname -a
FreeBSD papirus.te.ugm.ac.id 4.10-STABLE FreeBSD 4.10-STABLE #0: Tue Feb 27 16:32:40 WIT 2007 [email protected]:/usr/src/sys/compile/PAPIRUS i386

-su-2.05b# cd /usr/ports/databases/mysql50-client/
-su-2.05b# make
===> Vulnerability check disabled, database not found
===> Extracting for mysql-client-5.0.51
=> MD5 Checksum OK for mysql-5.0.51.tar.gz.
===> mysql-client-5.0.51 depends on file: /usr/local/sbin/pkg_info – found
===> Patching for mysql-client-5.0.51
===> Applying FreeBSD patches for mysql-client-5.0.51
===> mysql-client-5.0.51 depends on file: /usr/local/bin/libtool – found
===> Configuring for mysql-client-5.0.51
checking build system type… i386-portbld-freebsd4.10
checking host system type… i386-portbld-freebsd4.10
checking target system type… i386-portbld-freebsd4.10
checking for a BSD-compatible install… /usr/bin/install -c -o root -g wheel
checking whether build environment is sane… yes

–cut —

checking libedit variant of rl_completion_entry_function… no
checking defined rl_compentry_func_t and rl_completion_func_t… no
checking HIST_ENTRY is declared in readline/readline.h…
configure: error: Could not find system readline or libedit libraries
Use –with-readline or –with-libedit to use the bundled
versions of libedit or readline
===> Script “configure” failed unexpectedly.
Please report the problem to [email protected] [maintainer] and attach the
“/usr/ports/databases/mysql50-client/work/mysql-5.0.51/config.log” including
the output of the failure of your make command. Also, it might be a good idea
to provide an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).
*** Error code 1

Menurut informasi diatas, configure mandek karena tidak menemukan library system readline atau libedit. Saya sudah install kedual library tersebut dari port.

-su-2.05b# ls -al /var/db/pkg/
total 100
drwxr-xr-x 50 root wheel 1536 Jan 17 07:56 .
<cut>
drwxr-xr-x 2 root wheel 512 Jan 17 06:40 libedit-2.6.10_1
drwxr-xr-x 2 root wheel 512 Jan 17 06:36 libtool-1.5.24
drwxr-xr-x 2 root wheel 512 Jan 17 06:35 pkg_install-20060113
drwxr-xr-x 2 root wheel 512 Jan 17 07:56 readline-5.2_1
<cut>

Kemudian saya ikutin petunjuk dengan menambah argument –with-readline di Makefile

-su-2.05b# vi ../mysql50-server/Makefile

Setelah di eksekusi, sepertinya akan berhasil, karena pesan error saat configure tadi sudah tidak muncul. Setelah melalui proses configure, masuk ke tahap compiling. Nah permasalah kembali muncul, berikut kutipannya

Making all in extra
make all-recursive
source=’replace.c’ object=’replace.o’ libtool=no DEPDIR=.deps depmode=gcc /bin/sh ../depcomp cc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include -I../sql -DDBUG_OFF -O -pipe -c replace.c
/usr/local/bin/libtool –preserve-dup-deps –tag=CC –mode=link cc -DDBUG_OFF -O -pipe -o replace replace.o ../mysys/libmysys.a ../dbug/libdbug.a ../strings/libmystrings.a ../zlib/libzlt.la -pthread -lcrypt -lm -pthread
mkdir .libs
libtool: link: cannot find the library `../zlib/libzlt.la’ or unhandled argument `../zlib/libzlt.la’
*** Error code 1

Stop in /usr/ports/databases/mysql50-client/work/mysql-5.0.51/extra.
*** Error code 1

Stop in /usr/ports/databases/mysql50-client/work/mysql-5.0.51/extra.
*** Error code 1

Stop in /usr/ports/databases/mysql50-client/work/mysql-5.0.51/extra.
*** Error code 1

Stop in /usr/ports/databases/mysql50-client/work/mysql-5.0.51.
*** Error code 1

Stop in /usr/ports/databases/mysql50-client/work/mysql-5.0.51.
*** Error code 1

Stop in /usr/ports/databases/mysql50-client.

Sampai saat ini saya belum menemukan solusi diatas. Mungkin ada rekan yang tahu ?   Solusinya dibawah ini

Berhubung karena servernya akan segera digunakan, maka jika sampai sore nanti belum ketemu juga, maka saya akan upgrade OSnya ke freeBSD6.2 atau malah Ubuntu Gutsy. Soalnya hasil penelusuran di internet OS Freebsd versi 4.10 sudah tidak banyak digunakan sebagai Database Server hiks..

———————————– solved ——————————

Akhirnya sudah ketemu solusinya untuk pesan

libtool: link: cannot find the library `../zlib/libzlt.la’ or unhandled argument `../zlib/libzlt.la’

Itu artinya library zlib belum tercompile dengan baik. Selesaikan dengan cara

-su-2.05b# find work -name zlib -print
work/mysql-5.0.51/zlib
-su-2.05b# cd work/mysql-5.0.51/zlib/
-su-2.05b# make

Kemudian coba install kembali mysql5.0-client

-su-2.05b# cd /usr/ports/databases/mysql50-client/
-su-2.05b# make

Ternyata ketemu lagi problem

c++ -DDBUG_OFF -O -pipe -O -pipe -felide-constructors -fno-rtti -fno-exceptions -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -DUSE_PRAGMA_IMPLEMENTATION -o .libs/mysql mysql.o readline.o sql_string.o completion_hash.o ../cmd-line-utils/readline/libreadline.a -lncurses ../libmysql/.libs/libmysqlclient.so ../zlib/.libs/libzlt.a -lcrypt -lm -Wl,–rpath -Wl,/usr/local/lib/mysql
c++: ../cmd-line-utils/readline/libreadline.a: No such file or directory
*** Error code 1

Stop in /usr/ports/databases/mysql50-client/work/mysql-5.0.51/client.
*** Error code 1

Stop in /usr/ports/databases/mysql50-client/work/mysql-5.0.51.
*** Error code 1

Stop in /usr/ports/databases/mysql50-client/work/mysql-5.0.51.
*** Error code 1

Stop in /usr/ports/databases/mysql50-client.

Saya coba atasin dengan cara yang sama seperti pada library zlib

-su-2.05b# find work -name readline -print
work/mysql-5.0.51/include/readline
work/mysql-5.0.51/cmd-line-utils/libedit/readline
work/mysql-5.0.51/cmd-line-utils/readline
-su-2.05b# cd work/mysql-5.0.51/cmd-line-utils/
-su-2.05b# make

Setelah library readline tercompile, saya mencoba kembali compiling mysql50-client

-su-2.05b# cd /usr/ports/databases/mysql50-client/
-su-2.05b# make

Akhirnya berhasil dengan mulus proses compiling mysql50-client nya, diikuti dengan install ke system

-su-2.05b# make install

===> Compressing manual pages for mysql-client-5.0.51
===> Running ldconfig
/sbin/ldconfig -m /usr/local/lib/mysql
===> Installing ldconfig configuration file
===> Registering installation for mysql-client-5.0.51
-su-2.05b#

Sekarang tahapan install mysql50-server

-su-2.05b# cd /usr/ports/databases/mysql50-server/
-su-2.05b# make

Ternyata muncul permasalahan yang persis sama seperti saat compiling mysql50-client

libtool: link: cannot find the library `../zlib/libzlt.la’ or unhandled argument `../zlib/libzlt.la’

Karena ternyata working directorynya proses configure dan compilingnya berbeda antara mysql50-client dan mysql50-server. Maka saya ulangi cara diatas untuk mysql50-server, dan ternyata solved untuk masalah tersebut. Sekarang saya mengulangi kembali proses “make”

-su-2.05b# make

Dan berhasil dengan mulus… Sukses ternyata 🙂

-su-2.05b# make install

<cut>

************************************************************************

Remember to run mysql_upgrade (with the optional –datadir=<dbdir> flag)
the first time you start the MySQL server after an upgrade from an
earlier version.

************************************************************************
install-info –quiet /usr/local/info/mysql.info /usr/local/info/dir
===> Installing rc.d startup script(s)
===> Compressing manual pages for mysql-server-5.0.51
===> Registering installation for mysql-server-5.0.51
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/mysqld

This port has installed the following startup scripts which may cause
these network services to be started at boot time.
/usr/local/etc/rc.d/mysql-server.sh

If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type ‘make deinstall’
to deinstall the port if this is a concern.

For more information, and contact details about the security
status of this software, see the following webpage:
http://www.mysql.com/

Begitu pesan terakhir proses installasi mysql50-server. Akhirnya lega.. 🙂

Sekarang tinggal menyiapkan database untuk aplikasi yang baru. Thanks bagi rekan rekan yang sudah mencoba membantu. Tidak jadi upgrade OS lagi hehehe….

2 Responses to “Mandek terus, install mysql-5.0.51 di FreeBSD 4.10 Stable (solved!)”

  1. bimoseptyop says:

    Salam kenal pak:D
    tetap S.E.M.A.N.G.A.T

  2. manti says:

    -su-2.05b# find work -name readline -print
    work/mysql-5.0.51/include/readline
    work/mysql-5.0.51/cmd-line-utils/libedit/readline
    work/mysql-5.0.51/cmd-line-utils/readline
    -su-2.05b# cd work/mysql-5.0.51/cmd-line-utils/
    -su-2.05b# make
    =make don’t make… etc..

    ==========

    ….#cd work/mysql-5.0.51/
    #mcedit configure
    add this line:
    –with-readline
    –with-libedit
    and save..
    #./configue
    #make install

Leave a Reply to bimoseptyop