root@raspbian:/opt# startx -bash: startx: command not found #若报这个错,说明x服务没有装,利用search查一次是哪个包提供的 root@raspbian:/opt# apt search startx Sorting... Done Full Text Search... Done xinit/stable 1.4.0-1 arm64 X server initialisation tool #查到后直接安装 root@raspbian:/opt# apt install xinit
#若报这个错 xauth: file /root/.Xauthority does not exist
X.Org X Server 1.20.4 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.19.0-16-arm64 aarch64 Debian Current Operating System: Linux raspbian 5.10.42-Release-OPENFANS+20210611-v8 #1 SMP PREEMPT Fri Jun 11 17:19:45 CST 2021 aarch64 Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708_fb.fbdepth=16 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:E1:6A:E3 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000 dwc_otg.lpm_enable=0 console=ttyS0,115200 console=tty1 root=PARTUUID=daf1c5e3-02 rootfstype=ext4 elevator=deadline fsck.repair=yes net.ifnames=0 cgroup_enable=1 cgroup_memory=1 cgroup_enable=cpuset cgroup_enable=memory swapaccount=1 zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=lz4 zswap.max_pool_percent=25 rootwait Build Date: 19 April 2021 09:34:38AM xorg-server 2:1.20.4-1+deb10u3 (https://www.debian.org/support) Current version of pixman: 0.36.0 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Fri Aug 27 22:29:50 2021 (==) Using system config directory "/usr/share/X11/xorg.conf.d" (EE) Fatal server error: (EE) no screens found(EE) (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information. (EE) (EE) Server terminated with error (1). Closing log file.
xinit: giving up xinit: unable to connect to X server: Connection refused xinit: server error #错说明还有一个X的依赖包没有安装