tips:make clean仅清除之前编译所生成可执行文件及配置文件。make distclean要清除所有编译生成文件。

先接上文。

下载PHP源码包。

PHP下载地址。

官方网站

#下载PHP源码
dell@Ubuntu1601:~/PHP-7.1.3$ wget http://cn2.PHP.net/distributions/PHP-7.1.3.tar.gz
#解压源码包
dell@Ubuntu1601:~/PHP-7.1.3$ tar -zxvf httpd-2.4.25.tar.gz
切换到PHP源代码目录
#配置PHP安装选项
dell@Ubuntu1601:~/PHP-7.1.3$ ./configure --prefix=/usr/local/PHP7 --with-apxs=/usr/local/apache2/bin/apxs --wi th-config-file-path=/usr/local/lib --with-MysqL

配置过程中可能会遇到xml2-config not found. Please check your libxml2 installation.错误,需要我们先安装XML2。

checking whether to explicitly link against libgcc... no
checking whether to enable short tags by default... yes
checking whether to enable dmalloc... no
checking whether to enable IPv6 support... yes
checking whether to enable DTrace support... no
checking how big to make fd sets... using system default

Configuring extensions
checking size of long... (cached) 8
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking for gettimeofday... (cached) yes
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
dell@Ubuntu1601:~/PHP-7.1.3$
#安装xml2
dell@Ubuntu1601:~/PHP-7.1.3$ sudo apt install libxml2 libxml2-dev xml2

等待安装完成,重新配置PHP安装选项。

dell@Ubuntu1601:~/PHP-7.1.3$ ./configure --prefix=/usr/local/PHP7 --with-apxs=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --with-MysqL

以下是配置成功部分编译配置选项结果。

checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes

creating libtool
appending configuration tag "CXX" to libtool

Generating files
configure: creating ./config.status
creating main/internal_functions.c
creating main/internal_functions_cli.c
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License,available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process,you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license,you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.

config.status: creating PHP7.spec
config.status: creating main/build-defs.h
config.status: creating scripts/PHPize
config.status: creating scripts/man1/PHPize.1
config.status: creating scripts/PHP-config
config.status: creating scripts/man1/PHP-config.1
config.status: creating sapi/cli/PHP.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/PHP_config.h
config.status: executing default commands
configure: WARNING: unrecognized options: --with-apxs,--with-MysqL

注意最后一行提示(警告)。

生成并安装。

dell@Ubuntu1601:~/PHP-7.1.3$ make
...
Generating phar.PHP
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
invertedregexiterator.inc
pharcommand.inc
directorytreeiterator.inc
clicommand.inc
directorygraphiterator.inc
phar.inc

Build complete.
Don't forget to run 'make test'.
...
dell@Ubuntu1601:~/PHP-7.1.3$ make test
#根据机器配置,安装用时可能需要几分钟到几十分钟不等,请耐心等待安装完成。
dell@Ubuntu1601:~/PHP-7.1.3$ sudo make install
[sudo] dell 的密码:
Installing shared extensions:     /usr/local/PHP7/lib/PHP/extensions/no-debug-non-zts-20160303/
Installing PHP CLI binary:        /usr/local/PHP7/bin/
Installing PHP CLI man page:      /usr/local/PHP7/PHP/man/man1/
Installing PHPdbg binary:         /usr/local/PHP7/bin/
Installing PHPdbg man page:       /usr/local/PHP7/PHP/man/man1/
Installing PHP CGI binary:        /usr/local/PHP7/bin/
Installing PHP CGI man page:      /usr/local/PHP7/PHP/man/man1/
Installing build environment:     /usr/local/PHP7/lib/PHP/build/
Installing header files:          /usr/local/PHP7/include/PHP/
Installing helper programs:       /usr/local/PHP7/bin/
  program: PHPize
  program: PHP-config
Installing man pages:             /usr/local/PHP7/PHP/man/man1/
  page: PHPize.1
  page: PHP-config.1
Installing PEAR environment:      /usr/local/PHP7/lib/PHP/
[PEAR] Archive_Tar    - installed: 1.4.2
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util       - installed: 1.4.2
[PEAR] PEAR           - installed: 1.10.3
Wrote PEAR system config file at: /usr/local/PHP7/etc/pear.conf
You may want to add: /usr/local/PHP7/lib/PHP to your PHP.ini include_path
/home/dell/PHP-7.1.3/build/shtool install -c ext/phar/phar.phar /usr/local/PHP7/bin
ln -s -f phar.phar /usr/local/PHP7/bin/phar
Installing PDO headers:           /usr/local/PHP7/include/PHP/ext/pdo/
#查看当前目录文件
dell@Ubuntu1601:~/PHP-7.1.3$ ls
acinclude.m4      header              NEWS                              README.TESTING2
aclocal.m4        include             pear                              README.UNIX-BUILD-SYstem
appveyor          INSTALL             PHP7.spec                         README.WIN32-BUILD-SYstem
build             install-sh          PHP7.spec.in                      run_002_tmp.fixture
buildconf         libs                PHP.gif                           run-tests.PHP
buildconf.bat     libtool             PHP.ini-development               sapi
CODING_STANDARDS  LICENSE             PHP.ini-production                scripts
config.guess      ltmain.sh           README.EXT_SKEL                   server-tests-config.PHP
config.log        main                README.GIT-RULES                  server-tests.PHP
config.nice       makedist            README.input_filter               sessions
config.status     Makefile            README.MAILINGLIST_RULES          snapshot
config.sub        Makefile.frag       README.md                         stamp-h.in
configure         Makefile.fragments  README.namespaces                 stub.c
configure.in      Makefile.gcov       README.NEW-OUTPUT-API             tests
CONTRIBUTING.md   Makefile.global     README.ParaMETER_PARSING_API      travis
CREDITS           Makefile.objects    README.REdisT.BINS                TSRM
ext               makerpm             README.RELEASE_PROCESS            UPGRADING
EXTENSIONS        missing             README.SELF-CONTAINED-EXTENSIONS  UPGRADING.INTERNALS
footer            mkinstalldirs       README.STREAMS                    vcsclean
generated_lists   modules             README.SUBMITTING_PATCH           win32
genfiles          netware             README.TESTING                    Zend
dell@Ubuntu1601:~/PHP-7.1.3$ sudo cp PHP.ini-development /usr/local/lib/PHP.ini
dell@Ubuntu1601:~/PHP-7.1.3$ sudo cp /usr/local/apache2/conf/httpd.conf 
#修改前注意备份文件
/usr/local/apache2/conf/httpd.conf.bak dell@Ubuntu1601:~/PHP-7.1.3$ sudo vim /usr/local/apache2/conf/httpd.conf
#找到以下两行代码修改
#修改完成结果如下
# DirectoryIndex index.html index.PHP  
#设置apache的默认文件名次序  
#AddType application/x-httpd-PHP .PHP .phtml .PHP3 .inc  

#AddType application/x-httpd-PHP-source .PHPs  
 
#设置PHP文件后缀  
dell@Ubuntu1601:~/PHP-7.1.3$ sudo /etc/init.d/apachectl restart

编辑过程可能会遇到下面代码。(PHP5.4以上没有)

vi /usr/local/lib/PHP.ini  
#参考链接: http://PHP.net/manual/zh/security.globals.PHP
#register-golbals = On

安装到这一步,PHP还无法正常解析。

通过参考网上链接,发现Apache没有加载libPHP*.so模块。

#检查Apache模块加载情况
dell@Ubuntu1601:~$ /etc/init.d/apachectl -M
Loaded Modules:
 core_module (static)
 so_module (static)
 http_module (static)
 mpm_event_module (static)
 authn_file_module (shared)
 authn_core_module (shared)
 authz_host_module (shared)
 authz_groupfile_module (shared)
 authz_user_module (shared)
 authz_core_module (shared)
 access_compat_module (shared)
 auth_basic_module (shared)
 reqtimeout_module (shared)
 filter_module (shared)
 mime_module (shared)
 log_config_module (shared)
 env_module (shared)
 headers_module (shared)
 setenvif_module (shared)
 version_module (shared)
 unixd_module (shared)
 status_module (shared)
 autoindex_module (shared)
 dir_module (shared)
 alias_module (shared)
#检查Apache配置
dell@Ubuntu1601:~$ /etc/init.d/apachectl -t
Syntax OK

接着尝试重新编译安装PHP。

dell@Ubuntu1601:~$ cd PHP-7.1.3/
dell@Ubuntu1601:~/PHP-7.1.3$ ./configure --prefix=/usr/local/PHP7 --with-apxs2=/usr/local/apache2/bin/apxs --w ith-MysqL=/usr/local/MysqL --enable-ftp --with-freetype-dir=/usr/local/freetype --enable-mbstring --with-iconv

dell@Ubuntu1601:~/PHP-7.1.3$ make
dell@Ubuntu1601:~/PHP-7.1.3$ sudo make install
#部分报错信息
Generating phar.PHP
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
invertedregexiterator.inc
pharcommand.inc
directorytreeiterator.inc
clicommand.inc
directorygraphiterator.inc
phar.inc

Build complete.
Don't forget to run 'make test'.

Installing PHP SAPI module:       apache2handler
mkdir: cannot create directory '/usr/local/PHP7': Permission denied
mkdir: cannot create directory '/usr/local/PHP7/bin': No such file or directory
Makefile:147: recipe for target 'install-sapi' Failed
make: [install-sapi] Error 1 (ignored)
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apr//build-1/libtool' libPHP7.la /usr/local/apache2/modules
/usr/local/apr//build-1/libtool --mode=install install libPHP7.la /usr/local/apache2/modules/
libtool: install: install .libs/libPHP7.so /usr/local/apache2/modules/libPHP7.so
install: cannot create regular file '/usr/local/apache2/modules/libPHP7.so': Permission denied
apxs:Error: Command Failed with rc=65536
.
Makefile:147: recipe for target 'install-sapi' Failed
make: *** [install-sapi] Error 1
dell@Ubuntu1601:~/PHP-7.1.3$

推测需要重新安装PHP。

tips:已经重新安装测试机系统。

最新进展:

#按两下Tab键
#可以看到没有--with-apxs选项  
dell@Dell:~/PHP-7.1.3$ ./configure --prefix=/usr/local/PHP7.1 --with
display all 101 possibilities? (y or n)
--with-adabas=                --with-interbase=             --with-pcre-jit
--with-apxs2=                 --with-iodbc=                 --with-pcre-regex=
--with-birdstep=              --with-jpeg-dir=              --with-pdo-dblib=
--with-bz2=                   --with-kerberos=              --with-pdo-firebird=
--with-config-file-path=      --with-layout=                --with-pdo-MysqL=
--with-config-file-scan-dir=  --with-ldap=                  --with-pdo-oci=
--with-curl=                  --with-ldap-sasl=             --with-pdo-odbc=
--with-custom-odbc=           --with-libdir=                --with-pdo-pgsql=
--with-db1=                   --with-libedit=               --with-pear=
--with-db2=                   --with-libexpat-dir=          --with-pgsql=
--with-db3=                   --with-libmbfl=               --with-pic
--with-db4=                   --with-libxml-dir=            --with-png-dir=
--with-dbm=                   --with-libzip=                --with-pspell=
--with-dbmaker=               --with-litespeed              --with-qdbm=
--with-empress=               --with-mcrypt=                --with-readline=
--with-empress-bcs=           --with-mhash=                 --with-recode=
--with-enchant=               --with-mm=                    --with-sapdb=
--with-esoob=                 --with-MysqLi=                --with-snmp=
--with-EXTENSION=             --with-MysqL-sock=            --with-solid=
--with-fpm-acl                --with-ndbm=                  --with-system-ciphers
--with-fpm-group=             --with-oci8=                  --with-tags=
--with-fpm-systemd            --with-ODBCRouter=            --with-tcadb=
--with-fpm-user=              --with-odbcver=               --with-tidy=
--with-freetype-dir=          --with-onig=                  --with-tsrm-pth=
--with-gd=                    --with-openssl=               --with-tsrm-pthreads
--with-gdbm=                  --with-openssl-dir=           --with-tsrm-st
--More--

经过两天辛苦排查,终于发现是PHP编译选项有问题。 具体表现在代码

dell@Dell:~/PHP-7.1.3$ ./configure --prefix=/usr/local/PHP7 --with-apxs=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --with-MysqL

--with-apxs选项少一个2(--with-apxs2),其他选项可选。

编译完成,检查http配置文件。

#部分代码
dell@Dell:~$ cat /usr/local/apache2.4/conf/httpd.conf |more
#LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
#LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
#LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
#LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
LoadModule unixd_module modules/mod_unixd.so
#LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule info_module modules/mod_info.so
#LoadModule cgid_module modules/mod_cgid.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
#LoadModule actions_module modules/mod_actions.so
#LoadModule speling_module modules/mod_speling.so
#LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
#LoadModule rewrite_module modules/mod_rewrite.so
LoadModule PHP7_module        modules/libPHP7.so

<IfModule unixd_module>
#
# If you wish httpd to run as a different user or group,you must run
# httpd as root initially and it will switch.
#
--更多--

检查代码发现PHP7_module已经加载。

PHP安装完成后执行。

dell@dell-OptiPlex-390:~/PHP-7.1.3$ sudo cp PHP.ini-production /usr/local/lib/PHP.ini

编译Apache配置文件。

dell@DELL:~/SoftwareSource/PHP-7.1.4$ sudo vim /usr/local/apache2.2/conf/httpd.conf
#添加index.PHP
167 <IfModule dir_module>
168     DirectoryIndex index.html index.PHP
#添加支持PHP
169 </IfModule>
318     AddType application/x-compress .Z
319     AddType application/x-gzip .gz .tgz
AddType application/x-httpd-PHP .PHP .phtml
AddType application/x-httpd-PHP-source .PHPs

保存修改新建PHP测试页面。

#编辑PHPinfo.PHP
dell[@Dell](https://my.oschina.net/u/725578):~$ sudo vim /usr/local/apache2.4/htdocs/PHPinfo.PHP
#PHPinfo.PHP
<?PHP
PHPinfo();
?>

保存文件,浏览器输入输入链接。例如输入本机IP地址。

以下是编译成功与浏览器运行截图。

编译过程中还可能遇到

dell[@Dell](https://my.oschina.net/u/725578):~/PHP-7.1.3$ make install
Installing PHP SAPI module:       apache2handler
mkdir: cannot create directory '/usr/local/PHP7.1': Permission denied
mkdir: cannot create directory '/usr/local/PHP7.1/bin': No such file or directory
Makefile:146: recipe for target 'install-sapi' Failed
make: [install-sapi] Error 1 (ignored)
/usr/local/apache2.4/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libPHP7.la /usr/local/apache2.4/modules
/usr/local/apr/build-1/libtool --mode=install install libPHP7.la /usr/local/apache2.4/modules/
libtool: install: install .libs/libPHP7.so /usr/local/apache2.4/modules/libPHP7.so
install: cannot create regular file '/usr/local/apache2.4/modules/libPHP7.so': Permission denied
apxs:Error: Command Failed with rc=65536
.
Makefile:146: recipe for target 'install-sapi' Failed
make: *** [install-sapi] Error 1

错误,请以root权限重新运行安装程序。

dell[@Dell](https://my.oschina.net/u/725578):~/PHP-7.1.3$ sudo make install
Installing PHP SAPI module:       apache2handler
/usr/local/apache2.4/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool' libPHP7.la /usr/local/apache2.4/modules
/usr/local/apr/build-1/libtool --mode=install install libPHP7.la /usr/local/apache2.4/modules/
libtool: install: install .libs/libPHP7.so /usr/local/apache2.4/modules/libPHP7.so
libtool: install: install .libs/libPHP7.lai /usr/local/apache2.4/modules/libPHP7.la
libtool: install: warning: remember to run `libtool --finish /home/dell/PHP-7.1.3/libs'
chmod 755 /usr/local/apache2.4/modules/libPHP7.so
[activating module `PHP7' in /usr/local/apache2.4/conf/httpd.conf]
Installing shared extensions:     /usr/local/PHP7.1/lib/PHP/extensions/no-debug-zts-20160303/
Installing PHP CLI binary:        /usr/local/PHP7.1/bin/
Installing PHP CLI man page:      /usr/local/PHP7.1/PHP/man/man1/
Installing PHPdbg binary:         /usr/local/PHP7.1/bin/
Installing PHPdbg man page:       /usr/local/PHP7.1/PHP/man/man1/
Installing PHP CGI binary:        /usr/local/PHP7.1/bin/
Installing PHP CGI man page:      /usr/local/PHP7.1/PHP/man/man1/
Installing build environment:     /usr/local/PHP7.1/lib/PHP/build/
Installing header files:          /usr/local/PHP7.1/include/PHP/
Installing helper programs:       /usr/local/PHP7.1/bin/
  program: PHPize
  program: PHP-config
Installing man pages:             /usr/local/PHP7.1/PHP/man/man1/
  page: PHPize.1
  page: PHP-config.1
Installing PEAR environment:      /usr/local/PHP7.1/lib/PHP/
[PEAR] Archive_Tar    - installed: 1.4.2
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util       - installed: 1.4.2
[PEAR] PEAR           - installed: 1.10.3
Wrote PEAR system config file at: /usr/local/PHP7.1/etc/pear.conf
You may want to add: /usr/local/PHP7.1/lib/PHP to your PHP.ini include_path
/home/dell/PHP-7.1.3/build/shtool install -c ext/phar/phar.phar /usr/local/PHP7.1/bin
ln -s -f phar.phar /usr/local/PHP7.1/bin/phar
Installing PDO headers:           /usr/local/PHP7.1/include/PHP/ext/pdo/

Ubuntu源码Apache2安装支持PHP的更多相关文章

  1. HTML实现代码雨源码及效果示例

    这篇文章主要介绍了HTML实现代码雨源码及效果示例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

  2. ios中的.dylib和.a lib有什么区别?

    我知道Objectivec中的编译和运行时是什么,但是我想知道是什么画了这两个库之间的界限?他们的目的是什么,除了陈述一个是静态的而另一个是动态的?我们何时需要一个而不是另一个?

  3. ios – 如何使用Objective C类中的多个参数调用Swift函数?

    本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请发送邮件至dio@foxmail.com举报,一经查实,本站将立刻删除。

  4. ios – Swift 4添加手势:覆盖vs @objc

    我想在我的视图中添加一个手势,如下所示:但是,在Swift4中,我的编译器给出了以下错误:建议添加@objc以将此实例方法公开给Objective-C.实现此目的的另一个选项将覆盖touchesBegan()函数并使用它来处理点击.我试图以“Swift”的方式做到这一点,而不必带入Obj-C.有没有纯粹的Swift方式来添加这个轻击手势而不使用@objc?

  5. ios – 将视频分享到Facebook

    我正在编写一个简单的测试应用程序,用于将视频从iOS上传到Facebook.由于FacebookSDK的所有文档都在Objective-C中,因此我发现很难在线找到有关如何使用Swift执行此操作的示例/教程.到目前为止我有这个在我的UI上放置一个共享按钮,但它看起来已禁用,从我读到的这是因为没有内容设置,但我看不出这是怎么可能的.我的getVideoURL()函数返回一个NSURL,它肯定包含视

  6. ios – 以编程方式在Swift中添加联系人

    我想在Swift中以编程方式添加联系人.我发现了一些Objective-C示例,但我没有让它们工作,甚至在Objective-C中也没有.我不希望这涉及到AddressBookUI,因为我想从我自己的UI中获取值.解决方法这是在Swift中添加联系人的快速方法.我在我的iPhone5iOS7.1上验证了它,因为我发现模拟器并不总是与我的手机对AB的东西相同.您可以添加一个按钮并指向此方法:顺便说一下–它假设你已经分配了一个地址簿var,你可以通过覆盖viewDidAppear来打开视图.它也会执行安全提示

  7. ios – 为目标c中的方法传递未知类型的参数,可能吗?

    是否可以将未知类型的参数传递给objective-C方法?在C#中你可以写实现这一点,但我知道Objective-C没有泛型,所以有没有其他方法可以在Objective-C中实现这一点?我需要这个,因为我想创建一个方法来改变不同对象的文本颜色,如UITextField和UIButton的占位符文本.所以我的计划是创建一个名为textWhite的方法,然后在此方法中检查对象的类型,然后运行匹配的代码以使文本颜色变为白色.解决方法是的,可以传递未知类型的参数.见下面的例子.请参考使用id对象的链接作为参数Us

  8. ios – Swift指针算术和解除引用;将一些类似C的地图代码转换为Swift

    我有一点似乎没有工作的Swift代码……解决方法您正在指定locationPointer指向新位置,但仍在下一行中使用ptr,并且ptr的值尚未更改.将您的最后一行更改为:或者你可以改变指向var的指针并推进它:

  9. xamarin.ios – ShareKit与MonoTouch如何?

    有人可以验证ShareKit实际上是否可用于MonoTouch并指导我完成使其工作所需的步骤?解决方法您首先从getsharekit.com下载还是使用ShareKit2.0?

  10. ios – “禁用模块时使用’@import’”错误 – 启用模块和链接框架= YES

    我有一个使用CocoaPods并使用’SCLAlertView-Objective-C’窗格的项目.该pod使用@importUIKit;模块样式导入.我在目标和项目设置中将“启用模块(C&Objective-C)”和“自动链接框架”设置为YES.当模块被禁用时,我仍然得到“使用’@import’错误.有没有什么可以阻止Xcode能够启用模块,如使用.pch文件,任何链接器标志,或者我没有提到的任

随机推荐

  1. crontab发送一个月份的电子邮件

    ubuntu14.04邮件服务器:Postfixroot收到来自crontab的十几封电子邮件.这些邮件包含PHP警告.>我已经解决了这些警告的原因.>我已修复每个cronjobs不发送电子邮件(输出发送到>/dev/null2>&1)>我删除了之前的所有电子邮件/var/mail/root/var/spool/mail/root但我仍然每小时收到十几封电子邮件.这些电子邮件来自cronjobs,

  2. 模拟两个ubuntu服务器计算机之间的慢速连接

    我想模拟以下场景:假设我有4台ubuntu服务器机器A,B,C和D.我想在机器A和机器C之间减少20%的网络带宽,在A和B之间减少10%.使用网络模拟/限制工具来做到这一点?

  3. ubuntu-12.04 – 如何在ubuntu 12.04中卸载从源安装的redis?

    我从源代码在Ubuntu12.04上安装了redis-server.但在某些时候它无法完全安装,最后一次makeinstallcmd失败.然后我刚刚通过apt包安装.现在我很困惑哪个安装正在运行哪个conf文件?实际上我想卸载/删除通过源安装的所有内容,只是想安装一个包.转到源代码树并尝试以下命令:如果这不起作用,您可以列出软件自行安装所需的步骤:

  4. ubuntu – “apt-get source”无法找到包但“apt-get install”和“apt-get cache”可以找到它

    我正在尝试下载软件包的源代码,但是当我运行时它无法找到.但是当我运行apt-cache搜索squid3时,它会找到它.它也适用于apt-getinstallsquid3.我使用的是Ubuntu11.04服务器,这是我的/etc/apt/sources.list我已经多次更新了.我尝试了很多不同的debs,并没有发现任何其他地方的错误.这里的问题是你的二进制包(deb)与你的源包(deb-src)不

  5. ubuntu – 有没有办法检测nginx何时完成正常关闭?

    &&touchrestarted),因为即使Nginx没有完成其关闭,touch命令也会立即执行.有没有好办法呢?这样的事情怎么样?因此,pgrep将查找任何Nginx进程,而while循环将让它坐在那里直到它们全部消失.你可以改变一些有用的东西,比如睡1;/etc/init.d/Nginx停止,以便它会休眠一秒钟,然后尝试使用init.d脚本停止Nginx.你也可以在某处放置一个计数器,这样你就可以在需要太长时间时发出轰击信号.

  6. ubuntu – 如何将所有外发电子邮件从postfix重定向到单个地址进行测试

    我正在为基于Web的应用程序设置测试服务器,该应用程序发送一些电子邮件通知.有时候测试是使用真实的客户数据进行的,因此我需要保证服务器在我们测试时无法向真实客户发送电子邮件.我想要的是配置postfix,以便它接收任何外发电子邮件并将其重定向到一个电子邮件地址,而不是传递到真正的目的地.我正在运行ubuntu服务器9.10.先感谢您设置本地用户以接收所有被困邮件:你需要在main.cf中添加:然后

  7. ubuntu – vagrant无法连接到虚拟框

    当我使用基本的Vagrantfile,只配置了两条线:我看到我的虚拟框打开,但是我的流氓日志多次显示此行直到超时:然后,超时后的一段时间,虚拟框框终于要求我登录,但是太久了!所以我用流氓/流氓记录.然后在我的物理机器上,如果我“流氓ssh”.没有事情发生,直到:怎么了?

  8. ubuntu – Nginx – 转发HTTP AUTH – 用户?

    我和Nginx和Jenkins有些麻烦.我尝试使用Nginx作为Jenkins实例的反向代理,使用HTTP基本身份验证.它到目前为止工作,但我不知道如何传递带有AUTH用户名的标头?}尝试将此指令添加到您的位置块

  9. Debian / Ubuntu – 删除后如何恢复/ var / cache / apt结构?

    我在ubuntu服务器上的空间不足,所以我做了这个命令以节省空间但是现在在尝试使用apt时,我会收到以下错误:等等显然我删除了一些目录结构.有没有办法做apt-getrebuild-var-tree或类似的?

  10. 检查ubuntu上安装的rubygems版本?

    如何查看我的ubuntu盒子上安装的rubygems版本?只是一个想法,列出已安装的软件包和grep为ruby或宝石或其他:)dpkg–get-selections

返回
顶部