LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 825|回复: 10

使用ABS安装MySQL.

[复制链接]
发表于 2010-1-29 13:20:41 | 显示全部楼层 |阅读模式
目前熟悉FreeBSD,另外听说Archlinux可以通过ABS实现同FreeBSD的Ports安装软件的方法,于是尝试之。

用Root安装abs,新建普通用户,在普通用户下拷贝/var/abs/extra/mysql到/home/xxx/abs/local,然后进入mysql文件夹,使用makepkg -c进行编译。
最后出现的结果失败。
make[3]:***[ndb_select_count] Error 1
make[3]eaving directory '/home/xxx/abs/local/mysql/src/mysql-5.1.42/storage/ndb/tools'
make[2]:***[all-recursive] Error 1
make[2]eaving directory '/home/xxx/abs/local/mysql/src/mysql-5.1.42/storage/ndb'
make[1]:***[all-recursive] Error 1
make[1]eaving directory '/home/xxx/abs/local/mysql/src/mysql-5.1.42/storage'
make:***[all-recursive] Error 1
==>ERROR:Build Failed
        Aborting...



PS:2010-01-28才开始接触ArchLinux。
发表于 2010-1-29 13:55:24 | 显示全部楼层
就这几个错误吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-29 14:12:17 | 显示全部楼层
对。
下一行就跳出安装过程了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-29 14:41:21 | 显示全部楼层
另外如何设置MySQL配置参数?

是直接修改MySQL的PKGBUILD文档中的
build () {./configure }部分
还是
options()部分

或者是其他?
回复 支持 反对

使用道具 举报

发表于 2010-1-29 15:05:49 | 显示全部楼层
make[3]:***[ndb_select_count] Error 1前面一句是什么?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-29 15:26:02 | 显示全部楼层
上面还有一句。
collect2: ld returned 1 exit status
回复 支持 反对

使用道具 举报

发表于 2010-1-29 18:46:00 | 显示全部楼层
make[3]:***[ndb_select_count] Error 1前面十句是什么?

mysql我是自己编译的.没问题啊
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-30 20:16:55 | 显示全部楼层
一个屏幕的错误了。
ng -fno-implicit-templates -fno-exceptions -fno-rtti -Wl,--hash-style=gnu -Wl,--                                                                              as-needed -rdynamic -o ndb_select_all select_all.o NDBT_ResultRow.o NDBT_ReturnC                                                                              odes.o NDBT_Table.o NDBT_Output.o  ../../../storage/ndb/src/.libs/libndbclient.a                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread                                                                               ../../../dbug/libdbug.a ../../../mysys/libmysys.a ../../../strings/libmystrings                                                                              .a -lz -lpthread -lcrypt -lnsl -lm -lpthread
g++ -DHAVE_CONFIG_H -DNDEBUG   -I. -I../../../include  -I. -I../../../include -I                                                                              ../../../storage/ndb/include -I../../../include -I../../../storage/ndb/include -                                                                              I../../../storage/ndb/include/ndbapi -I../../../storage/ndb/include/util -I../..                                                                              /../storage/ndb/include/portlib -I../../../storage/ndb/test/include -I../../../s                                                                              torage/ndb/include/mgmapi -I../../../storage/ndb/include/kernel      -fPIC -marc                                                                              h=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing   -fno-implicit-templates -                                                                              fno-exceptions -fno-rtti -MT select_count.o -MD -MP -MF .deps/select_count.Tpo -                                                                              c -o select_count.o select_count.cpp
mv -f .deps/select_count.Tpo .deps/select_count.Po
/bin/sh ../../../libtool --preserve-dup-deps --tag=CXX   --mode=link g++    -fPI                                                                              C -march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasing   -fno-implicit-temp                                                                              lates -fno-exceptions -fno-rtti -static -Wl,--hash-style=gnu -Wl,--as-needed -rd                                                                              ynamic  -o ndb_select_count select_count.o NDBT_ReturnCodes.o NDBT_Table.o NDBT_                                                                              Output.o  ../../../storage/ndb/src/libndbclient.la ../../../dbug/libdbug.a ../..                                                                              /../mysys/libmysys.a ../../../strings/libmystrings.a -lz  -lpthread -lcrypt -lns                                                                              l -lm  -lpthread
libtool: link: g++ -fPIC -march=i686 -mtune=generic -O2 -pipe -fno-strict-aliasi                                                                              ng -fno-implicit-templates -fno-exceptions -fno-rtti -Wl,--hash-style=gnu -Wl,--                                                                              as-needed -rdynamic -o ndb_select_count select_count.o NDBT_ReturnCodes.o NDBT_T                                                                              able.o NDBT_Output.o  ../../../storage/ndb/src/.libs/libndbclient.a -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -l                                                                              pthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread ../../../dbu                                                                              g/libdbug.a ../../../mysys/libmysys.a ../../../strings/libmystrings.a -lz -lpthr                                                                              ead -lcrypt -lnsl -lm -lpthread
/usr/bin/ld: final link failed: No space left on device
collect2: ld returned 1 exit status
make[3]: *** [ndb_select_count] Error 1
make[3]: Leaving directory `/home/able/abs/local/mysql/src/mysql-5.1.42/storage/                                                                              ndb/tools'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/able/abs/local/mysql/src/mysql-5.1.42/storage/                                                                              ndb'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/able/abs/local/mysql/src/mysql-5.1.42/storage'
make: *** [all-recursive] Error 1
==> ERROR: Build Failed.
    Aborting...


好像是空间不够???
回复 支持 反对

使用道具 举报

发表于 2010-1-30 20:26:48 | 显示全部楼层

"No space left on device"

df -h看一下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-1-30 21:15:27 | 显示全部楼层
现在直接的/var/abs/local下编译。
在root用户下,拷贝/var/abs/extra/mysql到/var/abs/local/mysql
接着chown -r able mysql/
在able普通用户下,进入/var/abs/local/mysql,运行makepkg -c。

还在编译,都快30分钟了。(VM虚拟机中)

运行结果:
==> Tidying install...
  -> Purging other files...
  -> Compressing man and info pages...
  -> Stripping debugging symbols from binaries and libraries...
  -> Removing libtool .la files...
==> Creating package...
  -> Generating .PKGINFO file...
  -> Adding install script...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: mysql 5.1.42-1 i686 (Sat Jan 30 21:15:09 CST 2010)
==> Cleaning up...


产生三个文件
libmysqlclient-5.1.42-1-i686.pkg.tar.gz
mysql-5.1.42-1-i686.pkg.tar.gz
mysql-clients-5.1.42-1-i686.pkg.tar.gz


马上安装,进入root用户
pacman -U mysql-5.1.42.tar.gz,提示需要mysql-clients-5.1.42-1-i686.pkg.tar.gz
pacman -U mysql-clients-5.1.42-1-i686.pkg.tar.gz,提示需要libmysqlclient-5.1.42-1-i686.pkg.tar.gz

最后安装的顺序为
libmysqlclient-5.1.42-1-i686.pkg.tar.gz
mysql-clients-5.1.42-1-i686.pkg.tar.gz
mysql-5.1.42.tar.gz。

接下来:
在root用户下

启动:/etc/rc.conf的DAEMONS中加入mysqld或@mysqld
安装库:/usr/bin/mysql_install_db
修改权限:chown –R mysql /var/lib/mysql
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表