problem??????????????????????????????????????????????????????????????????????????????????????
1./autogen.sh
[sbox-MYTARGET: ~/hello-world] > ./autogen.sh
+ aclocal
+ autoconf
+ autoheader
+ automake --add-missing --foreign
+ ./configure
checking for a BSD-compatible install... /scratchbox/tools/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
solution just for try^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
selmi med amine wrote:
> run ./autogen.sh and get error "checking whether the C
> compiler works... configure: error: cannot run C
> compiled programs."
If you are compiling for other than native architecture, you should have
cputransp devkit selected for your target and selected a emulator, for
example for arm this is qemu-arm-cvs-m.
thx
in fact it was a "mmap: permission denied"
to rosolve this problem just run
$> echo 0 > /proc/sys/vm/mmap_min_addr
my solution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I have resolve this problem on ubuntu8.0.4;
please install the follows package one by one :
sudo dpkg -i /mnt/scratchbox-libs_1.0.6_i386.deb
sudo dpkg -i /mnt/scratchbox-core_1.0.6_i386.deb
sudo dpkg -i /mnt/scratchbox-toolchain-arm-gcc3.4-glibc2.3_1.0.2_i386.deb
sudo dpkg -i /mnt/scratchbox-devkit-cputransp_1.0.2_i386.deb
and then set up a ARM target referring to "http://scratchbox.org/documentation/user/scratchbox-1.0/html/installdoc.html"
problem?????????????????????????????????????????????????????????????????????????????????????????
zp@xul-ubuntu:~$ /scratchbox/login
Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
You dont have active target in scratchbox chroot.
Please create one by running "sb-menu" before continuing
Welcome to Scratchbox, the cross-compilation toolkit!
Use 'sb-menu' to change your compilation target.
See /scratchbox/doc/ for documentation.
Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
solution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1.
zp@xul-ubuntu:~$ su - root
Password:
root@xul-ubuntu:~# echo 0 >/proc/sys/vm/vdso_enabled
root@xul-ubuntu:~#
2.
zp@xul-ubuntu:~$ /scratchbox/login
You dont have active target in scratchbox chroot.
Please create one by running "sb-menu" before continuing
Welcome to Scratchbox, the cross-compilation toolkit!
Use 'sb-menu' to change your compilation target.
See /scratchbox/doc/ for documentation.
sb-conf: No current target
[sbox-: ~] >
problem????????????????????????????????????????????????????????????????????????????????????????
Installing Debian rootstrap
solution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(1)
Rootstrap contains prebuilt ARM libraries and development files. It provides one way of installing the required development libraries. It gives you a 'clean' target installation within Scratchbox. To install a rootstrap follow the instructions below:
1.
Copy or download the rootstrap tarball to '/scratchbox/packages/' (this needs to be done as root because normal users do not have permissions to write on '/scratchbox/packages/' directory)
2.
Login to Scratchbox
$ /scratchbox/login
3.
Select the MYTARGET target (if not already selected) with following command:
[sbox-HOST: ~] > sbox-config -st MYTARGET
4.
Extract the rootstrap into the MYTARGET target with:
[sbox-MYTARGET: ~] > sbox-config --extract-rootstrap
rootstrap_<version>.tar.gz
5.
To check updates and upgrading in rootstrap is a simple operation. Rootstrap can be updated with commands:
[sbox-MYTARGET: ~] > fakeroot apt-get update
[sbox-MYTARGET: ~] > fakeroot apt-get dist-upgrade
Note
It is very important that build environment libraries and include files match those on the target device. Any discrepancies can lead to errors that are very hard to track down.
(2)
apt-get install rootstrap
problem???????????????????????????????????????????????????????????????????????????????????????
how to install samba
solution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
安裝Samba Server出現異常@@...請達人解惑...qq
小弟是第一次碰ubuntu OS ,在網路上下載了Samba 的3.0.28a檔案
在文字模式下執行sudo apt-get install samba 這串指令, 結果出現以下訊息@@....
--------------------------------------------------------
Reading package lists... Done
Building dependency tree
Reading state information...Done
Package samba is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source
Hower the following packages replace it:
smbclient samba-common
E:Package samba has no installation candidate
-----------------------------------------------------
(字打到這...有點ORZ.. 因為我是看著工作機照打的)
想請問一下版上大大有沒有出現跟我一樣的問題...該怎麼解決??
==================================================
first should upadte you "apt":
sudo aptitude update
the dowload samba and install it by following order:
sudo aptitude install samba
==================================================
檔名如果是 deb,都可以點擊兩下直接
1.安装Samba:
sudo apt-get install samba
sudo apt-get install smbfs
2.在ubuntu8.04中添加新用户。(多余了)
# useradd user1
# passwd user1
密码:user1
3.在机器1创建smb帐户文件文件:/etc/samba/smbpasswd
# sudo touch /etc/samba/smbpasswd
# sudo smbpasswd -a user1
密码:user1
为了方便,我将user1直接用登陆系统的用户,密码我是设为系统用户的密码。这样不用设置ubuntu8.04中文件夹权限为777 。
4.在ubuntu下查看局域网中windows系统共享的文件夹:
在“位置”--“网络”--“Windows 网络”中就能看到其它的windows主机和他们共享的文件夹了。
5.在windows下查看局域网中ubuntu系统共享的文件夹:
备份并编辑smb.conf
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
在[global]中修改的内容如下:
找到 workgroup = MSHOME 把它改成
代码:
workgroup = workgroup(这里名称可以随便填,当然为了方便别人访问,最好还是填windows下工作组的名称)
doc charset = UTF-8
unix charset = UTF-8
后两行是为了防止中文目录乱码。(在ubuntu8.04中会报错不知道是为什么?我没有添加)
; security = user不用改为security = share 。用用户名和密码登陆吧,安全一些。就是前面设置的系统用户。
6.在smb.conf最后添加
[共享文件夹名]
path = /home/usr1/共享文件夹名
available = yes
browseable = yes
public = yes
writable = yes
例如:
[mnt]
path = /mnt/
available = yes
browseable = yes
public = no
writable = yes
添加你自己想要共享的文件夹即可。
warning: "public = yes" will result int that anyone can enter your share file fold without login
7 if you hope that the user "root" can login the samba share file
please mask the ";invalid users = root"
最后一步就是:
重启samba
sudo /etc/init.d/samba restart
OK!windows能通过samba访问ubuntu了。还能在windows下更改文件呢!
problem???????????????????????????????????????????????????????????????????????????????????????
how to install nfs
solution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
NFS(Network File System, 网络文件系统)可以通过网络将分享不同主机(不同的OS)的目录——可以通过NFS挂载远程主机的目录, 访问该目录就像访问本地目录一样!
一般而言, 使用nfs能够方便地使各unix-like系统之间实现共享. 但如果需要在unix-like和windows系统之间共享, 就得使用samba了!
NFS运行在SUN的RPC(Remote Procedure Call, 远程过程调用)基础上, RPC定义了一种与系统无关的方法来实现进程间通信. 由此, NFS server也可以看作是RPC server.
正因为NFS是一个RPC服务程序, 所以在使用它之前, 先要映射好端口——通过portmap设定. 比如: 某个NFS client发起NFS服务请求时, 它需要先得到一个端口(port). 所以它先通过portmap得到port number. (不仅NFS, 所有的RPC服务程序启动之前, 都需要设定好portmap)
在启动RPC服务(比如NFS)之前, 需要启动portmap服务!(关于nfs和portmap是否存在于当前系统, 看后面的"NFS安装"部分.
与NFS相关的几个文件, 命令
1、/etc/exports
对NFS卷的访问是由exports来批准, 它枚举了若干有权访问NFS服务器上文件系统的主机名.
2、/sbin/exportfs
维护NFS的资源共享. 可以通过它重新设定 /etc/exports 的共享目录, 卸载NFS Server共享的目录或者重新共享等.
3、/usr/sbin/showmount
用在 NFS Server 端,而 showmount 则主要用在 Client 端. showmount 可以用來查看 NFS 共享的目录资源.
4、/var/lib/nfs/xtab
NFS的记录文档: 通过它可以查看有哪些Client 连接到NFS主机的记录.
下面这几个并不直接负责NFS, 实际上它们负责所有的RPC
5、/etc/default/portmap
实际上, portmap负责映射所有的RPC服务端口, 它的内容非常非常之简单(后面详述)
6、/etc/hosts.deny
设定拒绝portmap服务的主机
7、/etc/hosts.allow
设定允许portmap服务的主机
安装NFS
Debian/Ubuntu上默认是没有安装NFS服务器的,首先要安装NFS服务程序:
$ sudo apt-get install nfs-kernel-server
(安装nfs-kernel-server时,apt会自动安装nfs-common和portmap)
这样,宿主机就相当于NFS Server。
同样地,目标系统作为NFS的客户端,需要安装NFS客户端程序。如果是Debian/Ubuntu系统,则需要安装nfs-common。
$ sudo apt-get install nfs-commmon
nfs-common和nfs-kernel-server都依赖于portmap!
配置NFS
由于NFS是一个RPC server程序. 而portmap是用来挂你RPC的端口号映射的. 所以先要配置portmap.
配置portmap
方法1: 编辑/etc/default/portmap, 将 -i 127.0.0.1 去掉.
方法2: $ sudo dpkg-reconfigure portmap , 对Should portmap be bound to the loopback address? 选N.
配置/etc/hosts.deny
(禁止任何host(主机)能和你的NFS服务器进行NFS连接),加入:
### NFS DAEMONS
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
配置/etc/hosts.allow
允许那些你想要的主机和你的NFS服务器建立连接。下列步骤将允许任何IP地址以192.168.2开头的主机(连接到NFS服务器上),也可以指定特定的IP地址。参看man页 hosts_access(5), hosts_options(5)。加入:
### NFS DAEMONS
portmap: 192.168.99.
lockd: 192.168.99.
rquotad: 192.168.99.
mountd: 192.168.99.
statd: 192.168.99.
/etc/hosts.deny 和 /etc/hosts.allow 设置对portmap的访问. 采用这两个配置文件有点类似"mask"的意思. 现在/etc/hosts.deny中禁止所有用户对portmap的访问. 再在/etc/hosts.allow 中允许某些用户对portmap的访问.
运行 $ sudo /etc/init.d/portmap restart 重启portmap daemon.
配置/etc/exports
NFS挂载目录及权限由/etc/exports文件定义
比如我要将将我的home目录中的/home/zp/share目录让192.168.2.*的IP共享, 则在该文件末尾添加下列语句:
/home/zp/share 192.168.2.*(rw,sync,no_root_squash)
或者:/home/zp/share 192.168.2.0/24(rw,sync,no_root_squash)
192.168.2.* 网段内的NFS客户端能够共享NFS服务器/home/zp/share目录内容.且有读,写权限, 并且该用户进入/home/zp/share目录后的身份为root
最好加上sync, 否则 $ sudo exportfs -r 时会给出警告, sync是NFS的默认选项.
运行 $ showmount -e 查看NFS server的export list.
若更改了/etc/exports, 运行 $ sudo exportfs -r 更新
运行 $ sudo /etc/init.d/nfs-kernel-server restart 重启nfs服务
/etc/exports实际上就是nfs服务器的核心配置文件了. 鸟哥的Linux私房菜列举了一些exports文件的写法.
测试NFS
可以尝试一下挂载本地磁盘(假设本地主机IP地址为:192.128.2.1,将/home/zp/share挂载到/mnt)
$ sudo mount 192.168.2.1:/home/zp/share /mnt
运行 $ df 看看结果
$ sudo umount /mnt
注意被拷贝文件的读/写权限!
另外, 可以使用一定的参数:
使用加参数的办法:mount -o nolock,rsize=1024,wsize=1024,timeo=15 192.168.2.130:/tmp/ /tmp/
problem???????????????????????????????????????????????????????????????????????????????????????
root@xul-ubuntu:~# /etc/init.d/nfs-kernel-server start
* Exporting directories for NFS kernel daemon... exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.5.*:/mnt/".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.5.155:/scratchbox/users/zp/targets/MYTARGET".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
exportfs: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.5.155:/scratchbox/users/zp/home".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
solution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
please add the option "no_subtree_check" as following:
/mnt/ 192.168.5.*(rw,sync,no_root_squash,no_subtree_check)
problem????????????????????????????????????????????????????????????????????????????????????????????????????
root@xul-ubuntu:~# sudo aptitude upadate
sudo: /etc/sudoers is mode 0640, should be 0440
relution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
root@xul-ubuntu:~# chmod 440 /etc/sudoers
problem????????????????????????????????????????????????????????????????????????????????????????????????????
zp@xul-ubuntu:~$ /scratchbox/login
ERROR: '/scratchbox/sbin/chroot-uid' is not suid ROOT.
relution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sudo chmod u+s /scratchbox/sbin/chroot-uidc
problem????????????????????????????????????????????????????????????????????????????????????????????????????
uninstall scratchbox
relution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
apt-get remove scratchbox-libs scratchbox-devicetools
rm -rf /scratchbox/users
problem????????????????????????????????????????????????????????????????????????????????????????????????????
cancerl "ln" link
relution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
????????
problem????????????????????????????????????????????????????????????????????????????????????????????????????
config-loader-libxml.c:26:30: libxml/xmlreader.h: No such file or directory
relution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
(1)make expat-2.0.1
./configure
make
(2)
root@zp-ubuntu:/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/usr/include# cp /scratchbox/users/zp/home/zp/expat-2.0.1/amiga/include/libraries/expat.h ./
(3)
root@zp-ubuntu:/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/usr/lib# cp /scratchbox/users/zp/home/zp/expat-2.0.1/.lib/libexpat* ./
problem????????????????????????????????????????????????????????????????????????????????????????????????????
chinese input mode
relution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sudo apt-get install im-switch fcitx
sudo im-switch -s fcitx -z default
problem????????????????????????????????????????????????????????????????????????????????????????????????????
[sbox-test5: ~/dbus-1.2.4/xultestfold] > ./xultest receive
./xultest: error while loading shared libraries: libdbus-1.so.3: cannot open shared object file: No such file or directory
relution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
root@zp-ubuntu:/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/usr/include# cp /scratchbox/users/zp/home/zp/dbus-1.2.4/dbus/dbus.h ./
root@zp-ubuntu:/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/usr/lib# cp /scratchbox/users/zp/home/zp/dbus-1.2.4/dbus/.libs/libdbus-* ./
problem??????????????????????????????????????????????????????????????????????????????????????????????????????
r-watch-dnotify.o dispatch.o driver.o expirelist.o policy.o selinux.o services.o signals.o test.o utils.o config-loader-expat.o main.o -lexpat ../dbus/.libs/libdbus-convenience.a
/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/lib/gcc/arm-linux/3.4.2/../../../../arm-linux/bin/ld: Warning: gc-sections option ignored
/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/lib/gcc/arm-linux/3.4.2/../../../../arm-linux/lib/libc_nonshared.a(elf-init.oS)(.text+0x54): In function `__libc_csu_init':
elf-init.c: undefined reference to `__init_array_start'
/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/lib/gcc/arm-linux/3.4.2/../../../../arm-linux/lib/libc_nonshared.a(elf-init.oS)(.text+0x58):elf-init.c: undefined reference to `__init_array_end'
/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/lib/gcc/arm-linux/3.4.2/../../../../arm-linux/lib/libc_nonshared.a(elf-init.oS)(.text+0xa8): In function `__libc_csu_fini':
elf-init.c: undefined reference to `__fini_array_start'
/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/lib/gcc/arm-linux/3.4.2/../../../../arm-linux/lib/libc_nonshared.a(elf-init.oS)(.text+0xac):elf-init.c: undefined reference to `__fini_array_end'
collect2: ld returned 1 exit status
make[2]: *** [dbus-daemon] Error 1
make[2]: Leaving directory `/home/zp/dbus-1.2.4/bus'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zp/dbus-1.2.4'
make: *** [all] Error 2
solution^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
root@zp-ubuntu:/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/usr/lib# rm libdbus-*
root@zp-ubuntu:/scratchbox/compilers/arm-linux-gcc3.4.cs-glibc2.3/usr/include# rm dbus.h
来源:CSDN
作者:ling
链接:https://blog.csdn.net/xulinguestc/article/details/3942926