
**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)


#if defined(OS_DARWIN)
                
#else
                fs::path ulimits_dir = "/etc/security/limits.d";
                fs::path ulimits_file = ulimits_dir / fmt::format("{}.conf", user);
                fmt::print("Will set ulimits for {} user in {}.\n", user, ulimits_file.string());
                std::string ulimits_content = fmt::format(
                    "{0}\tsoft\tnofile\t262144\n"
                    "{0}\thard\tnofile\t262144\n", user);
                fs::create_directories(ulimits_dir);
                WriteBufferFromFile out(ulimits_file.string());
                out.write(ulimits_content.data(), ulimits_content.size());
                out.sync();
                out.finalize();
#endif
            }
            catch (...)
            {
                std::cerr << "Cannot set ulimits: " << getCurrentExceptionMessage(false) << "\n";
            }
        }
        else
            fmt::print("Will not create a dedicated clickhouse user.\n");
        
        fs::path config_dir = prefix / options["config-path"].as<std::string>();
        if (!fs::exists(config_dir))
        {
            fmt::print("Creating config directory {}.\n", config_dir.string());
            fs::create_directories(config_dir);
        }