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


("config-path", po::value<std::string>()->default_value("etc/clickhouse-server"), "where to install configs")
            ("log-path", po::value<std::string>()->default_value("var/log/clickhouse-server"), "where to create log directory")
            ("data-path", po::value<std::string>()->default_value("var/lib/clickhouse"), "directory for data")
            ("pid-path", po::value<std::string>()->default_value("var/run/clickhouse-server"), "directory for pid file")
            ("user", po::value<std::string>()->default_value(DEFAULT_CLICKHOUSE_SERVER_USER), "clickhouse user to create")
            ("group", po::value<std::string>()->default_value(DEFAULT_CLICKHOUSE_SERVER_GROUP), "clickhouse group to create")
        ;
        po::variables_map options;
        po::store(po::parse_command_line(argc, argv, desc), options);
        if (options.count("help"))
        {
            std::cout << "Usage: "
                << (getuid() == 0 ? "" : "sudo ")
                << argv[0]
                << " install [options]\n";
            std::cout << desc << '\n';
            return 1;
        }
        
        
#if defined(OS_DARWIN)
        uint32_t path_length = 0;
        _NSGetExecutablePath(nullptr, &path_length);
        if (path_length <= 1)
            Exception(ErrorCodes::FILE_DOESNT_EXIST, "Cannot obtain path to the binary");
        std::string path(path_length, std::string::value_type());
        auto res = _NSGetExecutablePath(&path[0], &path_length);
        if (res != 0)
            Exception(ErrorCodes::FILE_DOESNT_EXIST, "Cannot obtain path to the binary");
        if (path.back() == '\0')