The pit __apt that the raspberry pie met at first.

Source: Internet
Author: User
Tags apache error log aliyun
1 Raspberry Pie apt domestic source modification
The system takes the source download too slowly, uses the Aliyun source or the Tsinghua University source
to give the address:
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

Action steps are:

#备份为 sources.list.bak
sudo cp/etc/apt/sources.list/etc/apt/sources.list.bak   
#编辑sources. List  file
sudo vim/etc/apt/sources.list     

After you modify the source, you may not be able to download it, you can comment out the contents of the/etc/apt/sources.list.d/raspi.list ...

2 Apache2 Startup error

Use
sudo apt-get install apache2 installation Apache2,
Using sudo service apache2 start, unexpectedly prompts
Job for Apache2.service failed. "Systemctl status Apache2.service ' and ' journalctl-xn ' for Deta

Use sudo journalctl-xn to see the error section in detail

--Logs begin at Wed 2016-12-21 16:54:46 CST, end at Thu 2016-12-22 CST. --Dec 09:19:28 raspberrypi apache2[10170]: Output of config test was:dec 09:19:28 raspberrypi apache2[10170]: APAC He2:syntax error on line 140 of/etc/apache2/apache2.conf:could not open configuratio Dec 09:19:28 raspberrypi Apache
2[10170]: Action ' configtest ' failed.
Dec 09:19:28 Raspberrypi apache2[10170]: The Apache error log may have more information. Dec 09:19:29 raspberrypi systemd[1]: Apache2.service:control process exited, code=exited Status=1 Dec 09:19:29 rasp
Berrypi systemd[1]: Failed to start lsb:apache2 Web server. --Subject:unit Apache2.service has failed--defined-by:systemd--Support:http://lists.freedesktop.org/mailman/listi
Nfo/systemd-devel----Unit Apache2.service has failed.
----The result is failed.
Dec 09:19:29 raspberrypi systemd[1]: unit Apache2.service entered failed state. Dec 09:19:29 raspberrypi sudo[10162]: Pam_unix (sudo:session): SessiOn closed for user root Dec 09:19:46 raspberrypi sudo[10303]: pi:tty=pts/0; PWD=/HOME/PI; User=root;
 Command=/bin/journalctl-xn

Hint. conf file can not open, guess may be some packages may be deleted or missing, before the installation of the PHP5, so will PHP5 reload ... Even better ...
(complete deletion: sudo apt-get purge apache2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.