
**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 (0 != fchmod(out.getFD(), S_IRUSR | S_IRGRP | S_IROTH | S_IXUSR | S_IXGRP | S_IXOTH))
                    throwFromErrno(fmt::format("Cannot chmod {}", main_bin_tmp_path.string()), ErrorCodes::SYSTEM_ERROR);
                out.finalize();
            }
            catch (const Exception & e)
            {
                if (e.code() == ErrorCodes::CANNOT_OPEN_FILE && geteuid() != 0)
                    std::cerr << "Install must be run as root: sudo ./clickhouse install\n";
                throw;
            }
            if (old_binary_exists)
            {
                fmt::print("{} already exists, will rename existing binary to {} and put the new binary in place\n",
                        main_bin_path.string(), main_bin_old_path.string());
                
                fs::rename(main_bin_path, main_bin_old_path);
            }
            fmt::print("Renaming {} to {}.\n", main_bin_tmp_path.string(), main_bin_path.string());
            fs::rename(main_bin_tmp_path, main_bin_path);
        }
        
        std::initializer_list<const char *> tools
        {
            "clickhouse-server",
            "clickhouse-client",
            "clickhouse-local",
            "clickhouse-benchmark",
            "clickhouse-copier",
            "clickhouse-obfuscator",
            "clickhouse-git-import",