Skip to content

the requirement to include the package libmodsecurity3 is insufficient. Missing files #11

@pszabop

Description

@pszabop

Error message from Cargo

  --- stderr
  libmodsecurity cannot be found on the system: 
  pkg-config exited with status code 1
  > PKG_CONFIG_PATH= PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config --libs --cflags modsecurity modsecurity >= 3.0.6

  The system library `modsecurity` required by crate `modsecurity-sys` was not found.
  The file `modsecurity.pc` needs to be installed and the PKG_CONFIG_PATH environment variable must contain its parent directory.
  PKG_CONFIG_PATH contains the following:
      - 

  HINT: you may need to install a package such as modsecurity, modsecurity-dev or modsecurity-devel.

  Vendoring is not supported at this time.

Dockerfile:

FROM rust:latest

RUN apt-get update && apt-get install -y \
    cmake zlib1g-dev lld

RUN apt-get update && apt-get install -y \
    libmodsecurity3 modsecurity-crs clang

Cargo.toml:

[package]
name = "test-modsec"
version = "1.0.0"
authors = ["redacted <redacted@example.com>"]
edition = "2021"

[profile.release]
incremental = true


[profile.dev]
incremental = true

[dependencies]
async-trait="0.1"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bytes = "1"
modsecurity = { git = "https://github.com/rkrishn7/rust-modsecurity", version = "0.1.4"  }

output of dkpkg -L from the docker container:

root@052754b216a5:/app# dpkg -L libmodsecurity3
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libexec
/usr/lib/x86_64-linux-gnu/libexec/modsec-rules-check
/usr/lib/x86_64-linux-gnu/libmodsecurity.so.3.0.9
/usr/share
/usr/share/doc
/usr/share/doc/libmodsecurity3
/usr/share/doc/libmodsecurity3/changelog.Debian.gz
/usr/share/doc/libmodsecurity3/changelog.gz
/usr/share/doc/libmodsecurity3/copyright
/usr/lib/x86_64-linux-gnu/libmodsecurity.so.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions