Trang Chủ | Diễn Đàn | Thành Viên (Đăng Ký) | Tìm Kiếm | Tutorial Room

RA MẮT THỬ NGHIỆM PHIÊN BẢN MỚI CỦA DIỄN ĐÀN

Perl-CGI - Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
Hỏi đáp, trao đổi về lập trình Perl-CGI.
- Các câu hỏi về tìm hosting hỗ trợ Perl xin hãy gởi vào box Web Hosting.
- Các câu hỏi về tìm chương trình forum, guestbook, hướng dẫn sử dụng, cấu hình các script viết bằng Perl...xin hãy gởi vào box Web Application.
First page Previous page  (Page 1 )   1   Next page Last page
Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
Member
Member since
22:02 18-03-2009
Posts: 3
Fantasy Points: 13
Rank
shy Posted at 22:06 22-03-2009 Move Move Topic   Pin/Unpin Pin Topic   Lock Lock Topic
Mình dang cài OTRS (Open-source Ticket Request System) len mấy Mac OS X , nhưng khi cài thi nó báo thiếu gói DBD::mysql làm theo hướng dẫn http://hootbah.co.uk/20...03/mamp-17-and-dbdmysql/ thì nó báo lỗi sau : khi chạy
perl -MCPAN -eshell
install DBD::mysql

...
Removing previously used /Users/thientan11/.cpan/build/DBD-mysql-4.010

CPAN.pm: Going to build C/CA/CAPTTOFU/DBD-mysql-4.010.tar.gz

Can't exec "mysql_config": No such file or directory at Makefile.PL line 76.

Cannot find the file 'mysql_config'! Your execution PATH doesn't seem
not contain the path to mysql_config. Resorting to guessed values!
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located


PLEASE NOTE:

For 'make test' to run properly, you must ensure that the
database user 'thientan11' can connect to your MySQL server
and has the proper privileges that these tests require such
as 'drop table', 'create table', 'drop procedure', 'create procedure'
as well as others.

mysql> grant all privileges on test.* to 'thientan11'@'localhost' identified by 's3kr1t';

You can also optionally set the user to run 'make test' with:

perl Makefile.pl --testuser=username

Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Can't exec "mysql_config": No such file or directory at Makefile.PL line 454.
Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located
Failed to determine directory of mysql.h. Use

perl Makefile.PL --cflags=-I<dir>

to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help
Running make test
Make had some problems, maybe interrupted? Won't test
Running make install
Make had some problems, maybe interrupted? Won't install

Các anh chỉ giùm cách khắc phục ?
Và neu có tài liệu nào tham khảo xin chủ giùm ?
Thank a lot !
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 1,993 time(s). 1 direct repli(es) and 3 indirect repli(es).
Title Poster
shy Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
 
answer Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
NBThanh
Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
Forum Moderator
Member since
20:03 17-08-2001
Posts: 18,138
Fantasy Points: 154,941
Rank
answer Posted at 22:40 22-03-2009
Reply to Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5 (applevn)
Qui trình bạn cài thì đúng rồi, tuy nhiên bạn cần kiểm tra 1 số thứ nữa:
- MySQL đã cài đặt và chạy ngon lành chưa?
- Các lệnh của MySQL như mysql_config nó nằm trong đường dẫn?
- Tạo database và username trong MySQL để chạy test với DBD:MySQL.

Hoặc bạn cũng có thể cài DBD::MySQL bằng tay (không qua CPAN Shell) và bỏ qua bước test:
- Download DBD::MySQL từ search.cpan.org
- shell> Perl Makefile.PL
- shell>make
- shell>make install
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 1,992 time(s). 1 direct repli(es) and 2 indirect repli(es).
Title Poster
answer Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
 
answer Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
applevn
Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
Member
Member since
22:02 18-03-2009
Posts: 3
Fantasy Points: 13
Rank
answer Posted at 00:47 23-03-2009
Reply to Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5 (NBThanh)
hic !
Mình đã chạy thử như bạn Thanh nói :
- Vào thư mục chứa DBD-mysql-2.1028 (đã Down ve)
- shell> Perl Makefile.PL
thỉ gặp lỗi sau :
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Can't exec "mysql_config": No such file or directory at Makefile.PL line 169.
readline() on closed filehandle PIPE at Makefile.PL line 171.
Failed to determine directory of mysql.h. Use

perl Makefile.PL --cflags=-I<dir>

to set this directory. For details see the INSTALL.html file,
section "C Compiler flags" or type

perl Makefile.PL --help

Mình nghĩ hệ thống thiếu thư viện gì đó?
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 1,988 time(s). 2 direct repli(es) and 0 indirect repli(es).
Title Poster
answer Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
 
answer Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
NBThanh
answer Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
rh
Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
Forum Moderator
Member since
20:03 17-08-2001
Posts: 18,138
Fantasy Points: 154,941
Rank
answer Posted at 01:30 23-03-2009
Reply to Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5 (applevn)
Bạn mở file Makefile.PL dòng 169 xem thử nó đang đòi file mysql_config ở thư mục nào?
Và bạn thiếu 1 số file .h của MySQL, bạn thử perl Makefile.PL --cflags=-I/usr/local/mysql/include (giả sử mysql bạn cài vào /usr/local/mysql và các file .h của MySQL nằm trong /usr/local/mysql/include)

Ngoài ra, nếu MySQL và Perl của bạn được cài từ trước qua RPM thì bạn cũng có thể cài tiếp DBD::mysql qua lệnh yum (fedora system) hoặc ap-get (ubuntu).
(Thử google với từ khóa yum DBD::mysql :-) )
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 1,985 time(s). 0 direct repli(es) and 0 indirect repli(es).
Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5
Member
Member since
20:59 13-04-2003
Posts: 73
Fantasy Points: 1,032
answer Posted at 07:56 23-03-2009
Reply to Re: Cài DBD::MySql với MAMP1.7 cho Mac OS X 10.5.5 (applevn)
Xem thêm ở đây http://forums.mysql.com/read.php?51,54411,86062#msg-86062

Tức là bạn phải cài thêm mysql-devel. Không biết cài thế nào trên Mac OS nhưng nếu cài từ package, thì phải chọn thêm cái này. Thông thường chỉ cài mysql(mysql server).

Chúc may mắn!
This post has been edited 1 time(s). Last edited by rh on 08:28 23-03-2009.
Reply Reply   Quote Quote   Edit Edit   Delete Delete   Report Report
This post has been viewed 1,977 time(s). 0 direct repli(es) and 0 indirect repli(es).
First page Previous page  (Page 1 )   1   Next page Last page

Permissions: Create Topic: No  |  Reply Topic: No  |  Attach File: No  |  Make Poll: No

Vietnamese Keyboard: AUTO TELEX VNI VIQR VIQR* OFF

Go top || Print page ||

All logos, trademarks and graphics artwork in this site are property of their respective owners.
Opinions expressed in articles within this site are those of their owners and may not reflect the opinion of TXBB.

TXBB: Home - Disclaimer - Help - Contact
Copyright (C) 2000-2006 TXBB. All rights reserved.

TreXanh Bulletin Board v2.0 (Build: #332 Nov 21, 2006)

DEBUG INFORMATION
Execution 0.243s - SQL used 7s - Concurrent process(es) 0