
**Describe the unexpected behaviour**
Trying to install clickhouse in FreeBSD (pfsense firewall), following this [link ](https://clickhouse.com/#quick-start)

**How to reproduce**
1 - copy the ClickHouse file into pfsense from [here](https://builds.clickhouse.com/master/freebsd/clickhouse)
2 - chmod a+x ./clickhouse
3 - sudo ./clickhouse install

 **Which ClickHouse server version to use**
- 21.12.1.8928 (official build


**Error message and/or stacktrace**
Code: 107. DB::Exception: Cannot obtain path to the binary from /proc/self/exe, file doesn't exist. (FILE_DOESNT_EXIST) (version 21.12.1.8928 (official build))
![image](https://user-images.githubusercontent.com/14872281/148040641-26f23fc0-39e9-4dcd-97dc-860c9cdefb9b.png)


changeOwnership(data_path, user, group,  false);
        
        fs::permissions(pid_path, fs::perms::owner_all | fs::perms::group_read | fs::perms::others_read, fs::perm_options::replace);
        
        fs::permissions(log_path, fs::perms::owner_all | fs::perms::group_all, fs::perm_options::replace);
        
        fs::permissions(data_path, fs::perms::owner_all, fs::perm_options::replace);
        fs::path odbc_bridge_path = bin_dir / "clickhouse-odbc-bridge";
        fs::path library_bridge_path = bin_dir / "clickhouse-library-bridge";
        if (fs::exists(odbc_bridge_path) || fs::exists(library_bridge_path))
        {
            createGroup(DEFAULT_CLICKHOUSE_BRIDGE_GROUP);
            createUser(DEFAULT_CLICKHOUSE_BRIDGE_USER, DEFAULT_CLICKHOUSE_BRIDGE_GROUP);
            if (fs::exists(odbc_bridge_path))
                changeOwnership(odbc_bridge_path, DEFAULT_CLICKHOUSE_BRIDGE_USER, DEFAULT_CLICKHOUSE_BRIDGE_GROUP);
            if (fs::exists(library_bridge_path))
                changeOwnership(library_bridge_path, DEFAULT_CLICKHOUSE_BRIDGE_USER, DEFAULT_CLICKHOUSE_BRIDGE_GROUP);
        }
        bool stdin_is_a_tty = isatty(STDIN_FILENO);
        bool stdout_is_a_tty = isatty(STDOUT_FILENO);
        
        const char * debian_frontend_var = getenv("DEBIAN_FRONTEND");
        bool noninteractive = debian_frontend_var && debian_frontend_var == std::string_view("noninteractive");
        bool is_interactive = !noninteractive && stdin_is_a_tty && stdout_is_a_tty;
        
        bool can_ask_password = !noninteractive && stdout_is_a_tty;
        
        if (has_password_for_default_user)
        {
            fmt::print(HILITE "Password for default user is already specified. To remind or reset, see {} and {}." END_HILITE "\n",