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
日記

Swagger EditerをDockerでローカル起動

1 Mins read

swagger

API開発で設計したDocment管理として使用できサンプルコードとしてJSONにしてくれて、よしなにPostmanみたいな動きしてくれるやつ

最近現場で使っているところが増えてる

ローカルでサーバー起動(例は3つ、外部APIサーバーが3つある場合などなど)

docker pull swaggerapi/swagger-editor
docker run -d -p 8090:8080 swaggerapi/swagger-editor
docker run -d -p 8091:8080 swaggerapi/swagger-editor
docker run -d -p 8092:8080 swaggerapi/swagger-editor

http://localhost:8090 などをブラウザで開き

ソース管理と一緒にリポジトリ内などにあるyamlファイル内容をコピペでブラウザ左Windowへ貼り付け

get、postなどテストをおこなう

※APIなので多少仕様の理解が必要となる

よく一緒に使われるのが OpenAPI

こちらはAPI設計ファイルとなったyamlファイルを読み込ませることにより指定した言語としてI/O部分のソースコードを自動でジェネレートしてくれるツール、ただし良いところばかりではなく、間違ったソースもジェネレートしてくるから地雷除去が必要な場面に出くわすこと多い

 

 

日記

AlmaLinux 8 GPG キー変更の準備をする

1 Mins read

dnfコマンドでエラー

dnf update

AlmaLinux 8 - BaseOS 485 kB/s | 3.4 kB 00:00 
GPG 鍵 0xC21AD6EA をインポート中: 
Userid : "AlmaLinux <packager@almalinux.org>" 
Fingerprint: E53C F5EF 91CE B0AD 1812 ECB8 51D6 647E C21A D6EA 
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux 
これでよろしいですか? [y/N]: y 
鍵のインポートに成功しました 
鍵をインポートしても役に立ちませんでした。鍵が間違っていませんか?

キーが新しくなった

AlmaLinux 8 GPG キーの変更

2024 年 1 月 12 日に、更新された GPG キーを使用して AlmaLinux 8 の RPM パッケージとリポデータへの署名を開始します。以下の手順を実行すると、切り替え後も引き続き問題なくアップデートを受信できるようになります。

システムに新しい AlmaLinux 8 GPG キーが既に含まれており、それを信頼していることを確認したい場合は、それをインポートするだけです。

sudo rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux
日記

MongoDB、Mongo Expressの環境をDockerで立ち上げる(docker-compose)

1 Mins read

ブラウザから

http://localhost:8081

ME_CONFIG_MONGODB_ADMINUSERNAME: root 
ME_CONFIG_MONGODB_ADMINPASSWORD: password

で指定したID,Passをブラウザへ入れてもログインできない?はて?

ブラウザのBasic認証用ID,Passの環境変数追加設定が必要だったらしい

ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: password

「docker-compose.yml」ファイル作成(下のコード)
「docker-compose up -d」コマンドをターミナルで実行


version: '3.1'

services:

  mongo:
    container_name: mongo-dev
    image: mongo
    restart: always
    ports:
      - "27017:27017"
    environment:
      MONGO_INITDB_ROOT_USERNAME: root
      MONGO_INITDB_ROOT_PASSWORD: password
    volumes:
      - ./configdb:/data/configdb
      - mongoDataStore:/data/db

  mongo-express:
    container_name: mongo-express
    image: mongo-express
    restart: always
    ports:
      - 8081:8081
    environment:
      ME_CONFIG_MONGODB_ADMINUSERNAME: root
      ME_CONFIG_MONGODB_ADMINPASSWORD: password
      ME_CONFIG_MONGODB_URL: mongodb://root:password@mongo:27017/
      ME_CONFIG_BASICAUTH_USERNAME: admin
      ME_CONFIG_BASICAUTH_PASSWORD: password

volumes:
  mongoDataStore:
    driver: local

Mac ターミナルからも接続確認(testDBはexpressからなどcreateしておくこと)

mongosh "mongodb://root:password@localhost:27017/testDB?authSource=admin"

Current Mongosh Log ID: 65be609e7384r68762b10b0
チームを強化する

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