Problems encountered in compiling and installing Apache,nginx,mysql,php, etc. for Raspberry Pie 3B

Keywords: Linux Ubuntu OpenSSL MySQL zlib

Raspberry Pie Compile Install LANMP

  1. brief introduction

    My raspberry pie here is 3 B Edition, CPU4 Kernel, memory 1 G,System I use is Ubuntu 19.10 Edition.The mirror uses Ali's mirror with the following source:

    deb https://mirrors.aliyun.com/ubuntu-ports eoan main restricted
    
    deb https://mirrors.aliyun.com/ubuntu-ports eoan-updates main restricted
    
    deb https://mirrors.aliyun.com/ubuntu-ports eoan universe
    deb https://mirrors.aliyun.com/ubuntu-ports eoan-updates universe
    
    deb https://mirrors.aliyun.com/ubuntu-ports eoan multiverse
    deb https://mirrors.aliyun.com/ubuntu-ports eoan-updates multiverse
    
    deb https://mirrors.aliyun.com/ubuntu-ports eoan-backports main restricted universe multiverse
    
    deb https://mirrors.aliyun.com/ubuntu-ports eoan-security main restricted
    deb https://mirrors.aliyun.com/ubuntu-ports eoan-security universe
    deb https://mirrors.aliyun.com/ubuntu-ports eoan-security multiverse

----------------- Question 1
The following error occurred when compiling and installing apr-util-1.5
libtool: error: 'crypto/crypt_blowfish.lo' is not a valid libtool object
In this case, it is possible that there was a cache at the time of previous compilation, so clean it up with make clean to compile the installation again

-------------- Question 2

HTTP The following errors may have occurred at compile time due to apr-util Version too high, change to 1.5 Try the version of
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_GetErrorCode'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetEntityDeclHandler'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ParserCreate'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetCharacterDataHandler'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ParserFree'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetUserData'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_StopParser'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_Parse'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_ErrorString'
/usr/local/apr-util/lib/libaprutil-1.so: undefined reference to `XML_SetElementHandler'
collect2: error: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory `/usr/local/httpd-2.4.26/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/httpd-2.4.26/support'
make: *** [all-recursive] Error 1

--------- Question 3
NGINX Compiler Problem
src/http/ngx_http_script.c:698:18: error: cast between incompatible function types from 'size_t ()(ngx_http_script_engine_t )'
{aka 'long unsigned int ()(struct <anonymous> )'} to 'void ()(ngx_http_script_engine_t )' {aka 'void ()(struct <anonymous> )'}
[-Werror=cast-function-type]
This error removes the werror from the MakeFile file, then clears the compilation cache and makes clean recompiles it

-------------- Question 4
Occurs when compiling and installing mariadb10.1.43: cc: fatal error: Killed signal terminated program cc1
This should be due to insufficient memory. The way I see from the Internet is to use swap memory, but since the raspberry pie was installed directly with a TF card, swap was not set at first, and then I set it or reported this error - internal compilation error
Later, my solution did not install the Mariadb database and instead used MySQL 5.6, which resulted in a successful compilation.

-------------- Question 5
Occurs when compiling PHP:
make: *** [Makefile:584: ext/openssl/openssl.lo] Error 1
error: storage size of 'cipher_ctx' isn't known
4848 | EVP_CIPHER_CTX cipher_ctx;
This is due to changes in interface calls to the latest version of OpenSSL, try changing PHP to a newer version, or use an older version of OpenSSL

PHP Compile Installation Configuration:

./configure --prefix=/usr/local/php5.3 --enable-mbstring --enable-xml --enable-fpm --enable-sockets --with-mysql=mysqlnd \
--with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
--with-libxml-dir=/usr --with-mcrypt --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-bz2 \
--with-mysql=/usr/local/mysql --enable-pcntl --enable-dba --with-gd --enable-gd-native-ttf --enable-gd-jis-conv --enable-ftp \
--enable-embedded-mysqli --with-webp-dir --enable-debug --enable-bcmath --with-ldap --with-gettext

1

NOTE raspberry pie compilation installs with onfigure: error: can not guess host type; you must specify one, which adds--build=arm-linux and--host=localhost
Php7.1.33 requires OpenSSL to be greater than 1.0.1: --with-openssl[=DIR] Include OpenSSL support (requires OpenSSL >= 0.9.6)
Require zlib greater than 1.2.0.4--with-zlib[=DIR] Include ZLIB support (requires zlib >= 1.2.0.4)
2
Compile-time: Freetype-config not foundation error, should be libfreetype-dev version is higher, version 6 on Ubuntu 19.10. You can download 2.8.1 to solve this problem

Posted by dotty on Mon, 16 Dec 2019 20:28:04 -0800