初玩树莓派所遇见的坑
生活随笔
收集整理的這篇文章主要介紹了
初玩树莓派所遇见的坑
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1 樹莓派apt國內源修改
系統自帶的源下載過慢,使用阿里云源或清華大學源 給出地址: deb http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib deb-src http://mirrors.aliyun.com/raspbian/raspbian/ jessie main non-free contrib操作步驟為:
#備份為 sources.list.bak sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #編輯sources.list 文件 sudo vim /etc/apt/sources.list修改源后,還可能不能下載,可將/etc/apt/sources.list.d/raspi.list中的內容給注釋掉…
2 Apache2啟動錯誤
使用
sudo apt-get install apache2安裝Apache2,
使用sudo service apache2 start,竟然提示
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for deta
使用sudo journalctl -xn詳細查看錯誤部分
-- Logs begin at Wed 2016-12-21 16:54:46 CST, end at Thu 2016-12-22 09:19:46 CST. -- Dec 22 09:19:28 raspberrypi apache2[10170]: Output of config test was: Dec 22 09:19:28 raspberrypi apache2[10170]: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Could not open configuratio Dec 22 09:19:28 raspberrypi apache2[10170]: Action 'configtest' failed. Dec 22 09:19:28 raspberrypi apache2[10170]: The Apache error log may have more information. Dec 22 09:19:29 raspberrypi systemd[1]: apache2.service: control process exited, code=exited status=1 Dec 22 09:19:29 raspberrypi systemd[1]: Failed to start LSB: Apache2 web server. -- Subject: Unit apache2.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit apache2.service has failed. -- -- The result is failed. Dec 22 09:19:29 raspberrypi systemd[1]: Unit apache2.service entered failed state. Dec 22 09:19:29 raspberrypi sudo[10162]: pam_unix(sudo:session): session closed for user root Dec 22 09:19:46 raspberrypi sudo[10303]: pi : TTY=pts/0 ; PWD=/home/pi ; USER=root ; COMMAND=/bin/journalctl -xn提示.conf文件不能打開,猜想可能是一些包可能被刪除或缺少了,之前又安裝了php5,于是乎將PHP5重裝了…竟然好了…
(完全刪除:sudo apt-get purge apache2)
總結
以上是生活随笔為你收集整理的初玩树莓派所遇见的坑的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 树莓派制作机顶盒
- 下一篇: 树莓派ssh连接问题