Mac 中执行 composer update 会有如下异常:
1 2 |
> composer -vvv update --ignore-platform-reqs Allowed memory size of 1610612736 bytes exhausted xxxxxxx |
网上翻了翻,自己试了试,记录如下:
- 在 /etc 中找 php.ini,发现只有 php.ini.default,故 cp php.ini.default[……]
事后拂衣去,深藏功与名。
Mac 中执行 composer update 会有如下异常:
1 2 |
> composer -vvv update --ignore-platform-reqs Allowed memory size of 1610612736 bytes exhausted xxxxxxx |
网上翻了翻,自己试了试,记录如下:
按照官方文档部署环境(也看过别的步骤,但最终还是认为这个最靠谱),到”Run a gRPC application”->”Run the server”的时候卡住了,npm install 时会报错。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
vagrant@homestead:~/grpc/examples/node$ npm install > grpc@1.18.0 install /home/vagrant/grpc/examples/node/node_modules/grpc > node-pre-gyp install --fallback-to-build --library=static_library sh: 1: node-pre-gyp: not found npm ERR! Linux 4.4.0-81-generic npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" npm ERR! node v6.11.1 npm ERR! npm v3.10.10 npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! grpc@1.18.0 install: `node-pre-gyp install --fallback-to-build --library=static_library` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the grpc@1.18.0 install script 'node-pre-gyp install --fallback-to-build --library=static_library'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the grpc package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build --library=static_library npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs grpc npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls grpc npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/vagrant/grpc/examples/node/npm-debug.log vagrant@homestead:~/grpc/examples/node$ |
看上去是没办法执行 n[……]
背景:编译 gRPC
报错:AC_CONFIG_MACRO_DIRS([m4]) conflicts with ACLOCAL.AMFLAGS=-I build-aux/m4
解决:
1 2 3 |
find . -name \*.m4|xargs dos2unix find . -name \*.ac|xargs dos2unix find . -name \*.am|xargs dos2unix |
直接参考:stackoverflow
间[……]
Laravel 中遇到这种场景: user 表与 meta 表是一对多的关系,结构如下:
1 2 3 4 |
user 表 # 名字 类型 排序规则 属性 空 默认 注释 额外 1 id主键 int(10) UNSIGNED 否 无 AUTO_INCREMENT 2 name varchar(255) utf8mb4_unicode_ci 否 无 |
1 2 3 4 5 6 |
meta 表 # 名字 类型 排序规则 属性 空 默认 注释 额外 1 id主键 int(10) UNSIGNED 否 无 AUTO_INCREMENT 2 user_id索引 int(10) UNSIGNED 否 无 3 meta_key索引 varchar(255) utf8mb4_unicode_ci 否 无 4 meta_value varchar(255) utf8mb4_unicode_ci 否 无 |
user.id 与 meta.user_id 关联。
当查询时需要[……]
抄自:这里。
1、yum install rust cargo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
[root@abc~]# <strong>yum install rust cargo</strong> Loaded plugins: langpacks Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast base | 3.6 kB 00:00:00 epel | 3.2 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 (1/4): extras/7/x86_64/primary_db | 204 kB 00:00:00 (2/4): epel/x86_64/updateinfo | 930 kB 00:00:00 (3/4): epel/x86_64/primary | 3.6 MB 00:00:00 (4/4): updates/7/x86_64/primary_db | 6.0 MB 00:00:01 epel 12696/12696 Resolving Dependencies --> Running transaction check ---> Package cargo.x86_64 0:1.29.0-3.el7 will be installed ---> Package rust.x86_64 0:1.29.2-3.el7 will be installed --> Processing Dependency: rust-std-static(x86-64) = 1.29.2-3.el7 for package: rust-1.29.2-3.el7.x86_64 --> Processing Dependency: libLLVM-5.0.so()(64bit) for package: rust-1.29.2-3.el7.x86_64 --> Running transaction check ---> Package llvm5.0-libs.x86_64 0:5.0.1-7.el7 will be installed ---> Package rust-std-static.x86_64 0:1.29.2-3.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================================ Installing: cargo x86_64 1.29.0-3.el7 epel 3.2 M rust x86_64 1.29.2-3.el7 epel 34 M Installing for dependencies: llvm5.0-libs x86_64 5.0.1-7.el7 epel 13 M rust-std-static x86_64 1.29.2-3.el7 epel 36 M Transaction Summary ================================================================================================================================================================================================================ Install 2 Packages (+2 Dependent packages) Total download size: 87 M Installed size: 268 M Is this ok [y/d/N]: y Downloading packages: (1/4): cargo-1.29.0-3.el7.x86_64.rpm | 3.2 MB 00:00:01 (2/4): llvm5.0-libs-5.0.1-7.el7.x86_64.rpm | 13 MB 00:00:01 (3/4): rust-std-static-1.29.2-3.el7.x86_64.rpm | 36 MB 00:00:02 (4/4): rust-1.29.2-3.el7.x86_64.rpm | 34 MB 00:00:03 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 19 MB/s | 87 MB 00:00:04 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : llvm5.0-libs-5.0.1-7.el7.x86_64 1/4 Installing : rust-std-static-1.29.2-3.el7.x86_64 2/4 Installing : rust-1.29.2-3.el7.x86_64 3/4 Installing : cargo-1.29.0-3.el7.x86_64 4/4 Verifying : rust-std-static-1.29.2-3.el7.x86_64 1/4 Verifying : cargo-1.29.0-3.el7.x86_64 2/4 Verifying : rust-1.29.2-3.el7.x86_64 3/4 Verifying : llvm5.0-libs-5.0.1-7.el7.x86_64 4/4 Installed: cargo.x86_64 0:1.29.0-3.el7 rust.x86_64 0:1.29.2-3.el7 Dependency Installed: llvm5.0-libs.x86_64 0:5.0.1-7.el7 rust-std-static.x86_64 0:1.29.2-3.el7 Complete! |
2、cargo install bat
1 2 3 4 |
[root@iZ25p0mspneZ ~]# <strong>cargo install bat</strong> Updating registry `https://github.com/rust-lang/crates.io-index` Downloading bat v0.8.0 error: [35] SSL connect error (Cannot communicate securely with peer: no common encryption algorithm(s).) |
但却得到了上面的错误,于是又搜索了一番,解[……]
先说结果:修改了fastcgi.conf中的配置解决问题。
服务器环境用lnmp自动安装的,头一次访问laravel的时候,报500错误,打开日志看了看,报错如下:
1 2 3 4 5 |
[23-May-2018 12:21:23 PRC] PHP Warning: require(): open_basedir restriction in effect. File(/data/.composer/vendor/testapp/vendor/autoload.php) is not within the allowed path(s): (/data/.composer/vendor/testapp/public/:/tmp/:/proc/) in /data/.composer/vendor/testapp/public/index.php on line 28 [23-May-2018 12:21:23 PRC] PHP Warning: require(/data/.composer/vendor/testapp/vendor/autoload.php): failed to open stream: Operation not permitted in /data/.composer/vendor/testapp/public/index.php on line 28 [23-May-2018 12:21:23 PRC] PHP Fatal error: require(): Failed opening required '/data/.composer/vendor/testapp/public/../vendor/autoload.php' (include_path='.:/usr/local/php/lib/php') in /data/.composer/vendor/testapp/public/index.php on line 28 |
看了看,大概意思是这样:
1,域名的根目录是:/[……]
一直对这种星轨的照片很向往(图自:叠加法星轨的拍摄及后期方法),后来了解到北京密云有个不老屯,也算个北京比较著名(当然也可能算过时)的拍星空的地方,主要的特色是有北京天文台密云观测站、中国科学院国家天文台密云射电天文观测基地(二者指的是同一个地方,后文简称天文台)里的50米射电望远镜以及射电[……]
搬迁服务器,原服务器上业务系统编码gb2312,搬迁到新服务器之后,网页打开乱码,网页meta已设置编码gb2312,但是浏览器中看到编码是utf8,手动改为gbk之后显示正常。
处理:修改apache配置文件httpd.conf,注释掉:AddDefaultCharset UTF-8(UTF[……]
某系统,正常运行在服务器A,现想搬到服务器B。所有已知的环境至少大版本号都一致,大部分环境版本完全一致。
问题出现:在B上查询本地数据库一个内容是中文的varchar字段,dbi报错,如下:
1 2 3 4 |
[user@localhost]$ perl test.pl SELECT id from TABLE where name= "测试内容" limit 10 DBD::mysql::st execute failed: Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=' at test.pl line 16. DBD::mysql::st fetchrow_array failed: fetch() without execute() at test.pl line 17. |
随后就围绕着这个报错开始尝试。[……]