if dpkg-maintscript-helper supports mv_conffile; then
dpkg-maintscript-helper mv_conffile \
/etc/lightdm.conf \
/etc/lightdm/lightdm.conf \
0.3.7-0ubuntu2 -- "$@"
fi
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/lightdm" ] && [ ! -L "/etc/init.d/lightdm" ]; then
if [ "`md5sum \"/etc/init.d/lightdm\" | sed -e \"s/ .*//\"`" != \
"`dpkg-query -W -f='${Conffiles}' lightdm | sed -n -e \"\\\\' /etc/init.d/lightdm '{s/ obsolete$//;s/.* //p}\"`" ]
then
echo "Obsolete conffile /etc/init.d/lightdm has been modified by you, renaming to .dpkg-bak"
mv -f "/etc/init.d/lightdm" "/etc/init.d/lightdm.dpkg-bak"
else
rm -f "/etc/init.d/lightdm"
fi
fi
fi
# End automatically added section
一、lightdm相关的deb包
下载自: ftp://mirrors.ustc.edu.cn/ubuntu/pool/main/l/lightdm/
代码:
/ubuntu/pool/main/l/lightdm/ 的索引
名称 大小 修改日期
[上级目录]
gir1.2-lightdm-1_1.0.1-0ubuntu6_amd64.deb 3.1 kB 11-10-7 下午9:04:00
gir1.2-lightdm-1_1.0.1-0ubuntu6_i386.deb 3.1 kB 11-10-7 下午9:05:00
liblightdm-gobject-1-0_1.0.1-0ubuntu6_amd64.deb 29.3 kB 11-10-7 下午9:04:00
liblightdm-gobject-1-0_1.0.1-0ubuntu6_i386.deb 29.9 kB 11-10-7 下午9:05:00
liblightdm-gobject-1-dev_1.0.1-0ubuntu6_amd64.deb 6.5 kB 11-10-7 下午9:04:00
liblightdm-gobject-1-dev_1.0.1-0ubuntu6_i386.deb 6.4 kB 11-10-7 下午9:05:00
liblightdm-gobject-1-doc_1.0.1-0ubuntu6_amd64.deb 20.5 kB 11-10-7 下午9:04:00
liblightdm-gobject-1-doc_1.0.1-0ubuntu6_i386.deb 20.3 kB 11-10-7 下午9:05:00
liblightdm-qt-1-0_1.0.1-0ubuntu6_amd64.deb 49.7 kB 11-10-7 下午9:04:00
liblightdm-qt-1-0_1.0.1-0ubuntu6_i386.deb 49.9 kB 11-10-7 下午9:05:00
liblightdm-qt-1-dev_1.0.1-0ubuntu6_amd64.deb 4.4 kB 11-10-7 下午9:04:00
liblightdm-qt-1-dev_1.0.1-0ubuntu6_i386.deb 4.3 kB 11-10-7 下午9:05:00
lightdm_1.0.1-0ubuntu6_amd64.deb 94.5 kB 11-10-7 下午9:04:00
lightdm_1.0.1-0ubuntu6.diff.gz 44.9 kB 11-10-7 下午9:03:00
lightdm_1.0.1-0ubuntu6.dsc 1.5 kB 11-10-7 下午9:03:00
lightdm_1.0.1-0ubuntu6_i386.deb 93.7 kB 11-10-7 下午9:05:00
lightdm_1.0.1.orig.tar.gz 624 kB 11-10-4 下午8:03:00
二、实际选用了 lightdm_1.0.1-0ubuntu6_i386.deb ,并将下面两个软件包中/usr/目录下的全部库文件一齐放进新的手工打包的lightdm.deb中:
gir1.2-lightdm-1_1.0.1-0ubuntu6_i386.deb
liblightdm-gobject-1-0_1.0.1-0ubuntu6_i386.deb
三、dpkg -b . xxx.deb手工打完包,dpkg -i命令安装时提示:
引用:
root@ubuntu:/home/user/lightdm/# dpkg -i /root/deb-ok/lightdm_1.0.1_i386.deb
(正在读取数据库 ... 系统当前总共安装有 158092 个文件和目录。)
正在解压缩 lightdm (从 .../deb-ok/lightdm_1.0.1_i386.deb) ...
/var/lib/dpkg/tmp.ci/preinst: 10: dpkg-maintscript-helper: not found
正在设置 lightdm (1.0.1-0ubuntu6) ...
/var/lib/dpkg/info/lightdm.postinst: 10: dpkg-maintscript-helper: not found
/var/lib/dpkg/info/lightdm.postinst: 10: dpkg-maintscript-helper: not found
正在添加组"lightdm" (GID 123)...
完成。
正在添加系统用户"lightdm" (UID 115)...
正在将新用户"lightdm" (UID 115)添加到组"lightdm"...
创建主目录"/var/lib/lightdm"...
usermod:无改变
usermod:无改变
usermod:无改变
正在处理用于 ureadahead 的触发器...
ureadahead will be reprofiled on next reboot
正在处理用于 man-db 的触发器...
安装结束时出现桌面管理器菜单,有gdm,xdm,lxdm,lightdm. 选择lightdm作为默认值。
查看preinst 文件内容如下:
引用:
#!/bin/sh
set -e
if dpkg-maintscript-helper supports mv_conffile; then
dpkg-maintscript-helper mv_conffile \
/etc/lightdm.conf \
/etc/lightdm/lightdm.conf \
0.3.7-0ubuntu2 -- "$@"
fi
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/lightdm" ] && [ ! -L "/etc/init.d/lightdm" ]; then
if [ "`md5sum \"/etc/init.d/lightdm\" | sed -e \"s/ .*//\"`" != \
"`dpkg-query -W -f='${Conffiles}' lightdm | sed -n -e \"\\\\' /etc/init.d/lightdm '{s/ obsolete$//;s/.* //p}\"`" ]
then
echo "Obsolete conffile /etc/init.d/lightdm has been modified by you, renaming to .dpkg-bak"
mv -f "/etc/init.d/lightdm" "/etc/init.d/lightdm.dpkg-bak"
else
rm -f "/etc/init.d/lightdm"
fi
fi
fi
# End automatically added section
四、在终端中以root运行lightdm提示:
引用:
root@ubuntu:/home/user/lightdm# lightdm
lightdm: symbol lookup error: lightdm: undefined symbol: g_bus_own_name
应为g_bus_own_name相应的符号链接丢失。请问如何修复?
是否除了ubuntu 11.04及以上版本外,低版本ubuntu真的无法安装lightdm?