Linux日記

CentOS 6.9 (64bit) に xampp linux x64 5.6.31 をインストール

3 Mins read

久しぶりに環境設定で少しハマったので書き込み

CentOS 6.9 (64bit) にxampp linux x64 5.6.31 をインストールしたら以下のエラーで起動できない。

# ./lampp start
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
 
id: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/share/xampp/xampplib: line 11: test: -ne: unary operator expected
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/httpd: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

「libc.so.6」ライブラリが無いか?環境変数のPathがおかしいんだろうと決め込んで確認コマンド投げる

yumで確認
#yum provides */libc.so.6
 
読み込んだプラグイン:fastestmirror, security
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
base/filelists_db | 6.4 MB 00:00
extras/filelists_db | 25 kB 00:00
updates/filelists_db | 2.9 MB 00:00
glibc-2.12-1.209.el6.x86_64 : The GNU libc libraries
リポジトリー : base
一致 :
ファイル名 : /lib64/libc.so.6
 
glibc-2.12-1.209.el6.i686 : The GNU libc libraries
リポジトリー : base
一致 :
ファイル名 : /lib/i686/nosegneg/libc.so.6
ファイル名 : /lib/libc.so.6
 
glibc-2.12-1.209.el6_9.1.i686 : The GNU libc libraries
リポジトリー : updates
一致 :
ファイル名 : /lib/i686/nosegneg/libc.so.6
ファイル名 : /lib/libc.so.6
 
glibc-2.12-1.209.el6_9.2.i686 : The GNU libc libraries
リポジトリー : updates
一致 :
ファイル名 : /lib/i686/nosegneg/libc.so.6
ファイル名 : /lib/libc.so.6
 
glibc-2.12-1.209.el6_9.2.x86_64 : The GNU libc libraries
リポジトリー : updates
一致 :
ファイル名 : /lib64/libc.so.6
 
glibc-2.12-1.209.el6_9.1.x86_64 : The GNU libc libraries
リポジトリー : updates
一致 :
ファイル名 : /lib64/libc.so.6
 
glibc-2.12-1.209.el6_9.2.x86_64 : The GNU libc libraries
リポジトリー : installed
一致 :
ファイル名 : /lib64/libc.so.6
 
glibc-2.12-1.209.el6_9.2.i686 : The GNU libc libraries
リポジトリー : installed
一致 :
ファイル名 : /lib/i686/nosegneg/libc.so.6
ファイル名 : /lib/libc.so.6

いるね~

なんじゃ?リンク切れか?。。。リンクあるし???
はて?

起動時にエラー?

起動ファイルlampp=xamppファイルなのでviでオープンし中身確認

どうやら起動時のOSバージョンチェックで読み込み先共通ライブラリが違っていることが原因見たいだけど、このエラーメッセージからはそんなこと読み取れん!Cのデバッグと同じで落ちている箇所やエラーメッセージに騙されてはいかんやつやな(笑)本質の問題を見分ける所は。。。人生と同じか(苦笑)

CentOSのバージョン確認「2.6.32」部分がキーとなっておりこれを超えているか?のチェックっぽい
#more /proc/version
Linux version 2.6.32-696.13.2.el6.x86_64 (mockbuild@c1bl.rdu2.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) ) #1 SMP Thu O
ct 5 21:22:16 UTC 2017

viでxamppを開き436行目の
「export LD_ASSUME_KERNEL=2.2.5」

「export LD_ASSUME_KERNEL=2.8.0」
へ変更してあげる

こんな感じ
# do we have that new red hat linux 9 with posix native threads?
if test $(osguess) = "rh9"
then
# for now disable PNTL. if PNTL gets more popular we will support it. - oswald [8apr3]
export LD_ASSUME_KERNEL=2.8.0
#echo "XAMPP: DISABLE PNTL..."
fi

これで無事起動♪
#./lampp start

Related posts
LinuxPHPWordpressパソコンのこと

Wordpress "mixed content the page at ' url ' was loaded over https" nginx reverse proxy

1 Mins read

Nginx のリバースプロキシ環境において、フロントエンドの Nginx が 443 (HTTPS) でリクエストを受け付け、内部では 80 (HTTP) でラウンドロビン方式の負荷分散を行っている場合、Chrome で Mixed Content エラー が発生することがあります。

この問題を解決するために、wp-config.php の冒頭に以下の設定を追加すると効果的です。

/** mixed content the page at ' url ' was loaded over https wordpress nginx */
/** プロキシ設定の場合、httpsでリダイレクトするように設定が必要! */
/** HTTP_X_FORWARDED_FOR の環境変数名はAWSなどお使いのサーバー環境により若干変更されている時があるので要確認すること */
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $_SERVER['HTTPS'] = 'on';
}

内部では 80 (HTTP)側の nginx.conf ファイルを操作できる方は、以下の設定でも対応可能です。

どちらかお好みでOK

location ~ \.php$ {
    include fastcgi_params;

    # mixed content the page at ' url ' was loaded over https wordpress nginx
    # プロキシ設定の場合、httpsでリダイレクトするように設定が必要!ここから
    fastcgi_param HTTPS on;
    fastcgi_param HTTP_X_FORWARDED_PROTO https;
    # ここまで

    fastcgi_intercept_errors on;
    fastcgi_pass php-fpm;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
LinuxmacOSRubyパソコンのこと

Rails 7.0.8.7 Updateで起動エラー "Logger::Severity.constants.each do |severity|"

1 Mins read

Ruby 3.2.6

Ruby on Rails 7.0.8.7

起動でこける

原因はgem

gem 'concurrent-ruby', '1.3.5'

Gemfileの末尾に追記して、しばらく固定にしておく

gem 'concurrent-ruby', '1.3.4'

追記したらインストール

bundle install

# Fetching concurrent-ruby 1.3.4 (was 1.3.5)
# Installing concurrent-ruby 1.3.4 (was 1.3.5)

以下ログ

# gem 'concurrent-ruby', '1.3.5' では以下エラーになるので'1.3.4'固定にしておく
#
# bundler: failed to load command: puma (/app-root/vendor/bundle/ruby/3.2.0/bin/puma)
# /app-root/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:12:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
#
# Logger::Severity.constants.each do |severity|
# ^^^^^^^^^^
Windows11パソコンのこと日記

リモートデスクトップ 音が出ない Windows11

1 Mins read
  • 状況
    • リモートデスクトップ接続でリモート側のアプリからホストへ音が出ない場合
    • リモート側のSleep後に音が出なくなった場合
  • 環境
    • host側:Windows11 22H2
    • remote側:Windows11 22H2
  • 対応方法
    • remote側のWindowsの検索で「service」と入力
    • サービスアプリをダブルクリックで起動する
    • 「Windows Audio」というサービスを選択し、右クリックから「サービスの再起動」
チームを強化する

サービスの
サブスクリプションの利点を説明するテキストを追加します。