Simple install using "apt install ANY_PACKAGE" does not work for me.
(Working around it with manually wgeting stuff and "dpkg -i"ing it).
Freshly installed termux on a Samsung SM-T700 tablet. Android version 5.0.2.
$ apt --version
apt 1.2.1 (arm)
$ strace -tt -s99 -f -oLOG.TXT apt install sox
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package sox
$ _
Please find the LOG.TXT file attached. I don't see any attempt to resolve "termux.net" thru DNS there... is that normal?
Ping works. stracing "ping -c1 termux.net" shows how DNS resolution looks like in a working case:
...
18877 socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 4
18877 setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
18877 connect(4, {sa_family=AF_LOCAL, sun_path="/dev/socket/dnsproxyd"}, 110) = 0
18877 fcntl64(4, F_GETFL) = 0x2 (flags O_RDWR)
18877 fstat64(4, {st_mode=S_IFSOCK|0777, st_size=0, ...}) = 0
18877 mprotect(0xb6e65000, 4096, PROT_READ|PROT_WRITE) = 0
18877 mprotect(0xb6e65000, 4096, PROT_READ) = 0
18877 write(4, "gethostbyname 0 termux.net 2\0", 29) = 29
18877 read(4, "222\0\0\0\0\vtermux.net\0\0\0\0\0\0\0\0\2\0\0\0\4\0\0\0\20h\22%\352termh\22$\352et\0\0\0\0\0\20h\22$\352et\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096) = 75
18877 close(4) = 0
18877 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
18877 socket(PF_LOCAL, SOCK_STREAM, 0) = 5
18877 connect(5, {sa_family=AF_LOCAL, sun_path="/dev/socket/fwmarkd"}, 110) = 0
18877 sendmsg(5, {msg_name(0)=NULL, msg_iov(1)=[{"\1\0\0\0\0\0\0\0\0\0\0\0", 12}], msg_controllen=16, [{cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, [4]}], msg_flags=0}, 0) = 12
18877 recvfrom(5, "\0\0\0\0", 4, 0, NULL, NULL) = 4
18877 close(5) = 0
18877 connect(4, {sa_family=AF_INET, sin_port=htons(1025), sin_addr=inet_addr("104.18.37.234")}, 16) = 0
...
This is a strace of ping command from the same tablet in the same termux terminal window.
Did you run apt update at least once? It is required to fetch the package list.
Yes, this worked.
How was I supposed to know that? Did I miss a prominent message about that somewhere during install?
Yes. When you first start termux a popup window is supposed to inform you about running apt update and would repeat until you tap "Do not show again".

Sorry, looks like my mistake!
@dvlasenk No problem, great that it works now!
Simple install using "apt install ANY_PACKAGE" does not work for me.E: Unable to locate package sox
@rjchaniya have you run apt update? Try pkg install sox.
i run htttps:// termux.net on android brouser than download inrealese from this displayed link /disk/stable
@ajaysbugatti You see this ? Right ?

If so - you are ok.
Most helpful comment
Did you run
apt updateat least once? It is required to fetch the package list.