I'm having problems with Canvas, and can't install it.
Can anyone explain why it is so hard to download Canvas?
Solution:Jump to solution
```
pkg install x11-repo
pkg install xorgproto nodejs
export GYP_DEFINES="android_ndk_path=''"
npm install canvas...
37 Replies
@Rubinator someone please🙏
@CtrlAltCuteness please someone
Sorry pings i can't really wait :3
Let's take a step back. What is your end goal you are trying to achieve?
To download Canvas for my little welcome card API thing, it will be only for me tho.
That nodejs canvas thing
Not sure about those names but canvas it is called.
Let me rephrase... What is the end goal you are trying to achieve? What is it that you need it for?
I need it for my welcome card, you know one of those things you see, welcome card for discord. (Image example) I got a code ready for it, but i can't use it if i dont have canvas.

Why are you making a bot to run on your phone anyways?
For fun, its easier becuase i dont have a pc
I have created many bots in termux
Nearly all
npm
/ pip
/ etc. module that compiles native code normally needs to have source code changes made to it to work on Termux.
First, check if a package for it already has been compiled.So what do i do
-# i am stupid 👍
I guess you didn't read what I just typed?
Bc ^
If you expect Linux to be as easy as Windows or Macintosh are, you are sadly mistaken.
Uhm okay
Someone else could better phrase it than I could.
Also note that being impatient is more likely to have less people here help you.
Sorry if i dont understand, may be because im not so good at english, could you please explain what do i need to do. I can give you the error message if that helps..?
Pastebin
Code! - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Package 'xproto', required by 'x11', not foundIs this inside OR outside of a proot? This seems to require the X11 (read: "desktop") environment. Also, this is trying to build a native library, which likely will not succeed as it isn't set up to be built for Termux. You are trying to compile code that is made for an ordinary Linux system, and Termux is not an ordinary Linux system.
I am running the
npm install canvas
commandCheck the next line of what it output... See the
prebuild-install -r napi || node-gyp rebuild
? It is trying to compile code.Ohh
This code needs to be patched to run on Termux... Also, further into your error, it shows stuff about X11...
What's X11?
Do you know other packages to do this same?
If this needs a lot of setup.
First, I would like to take the chance to ask a question which may sound stupid, apologizes if so... do you know how to use the Linux command line / exit out of Vim / etc.?
^ @MrSkraba
No idea what you talking about?
Why you asking this?
Does is this related to my question?
How to Termux
- Learn your way around the terminal
https://linuxjourney.com/lesson/the-shell
- Getting started on Termux
https://wiki.termux.com/wiki/Getting_started
- Differences from a usual Linux distribution
https://wiki.termux.com/wiki/Differences_from_Linux
- Basics of Bash (the default shell)
http://mywiki.wooledge.org/BashGuide/CommandsAndArguments
- Bash cheatsheet
https://devhints.io/bash
@MrSkraba these commands worked for me, does this work for you? or is this a different thing from what you need?
They are not doing so in a proot distro
Solution
This worked for you?
yes but i have a lot of stuff installed in termux
Alright
you might need additional
pkg install
commands in addition to those if you see other errorsI Will try
Also remember that you cannot use the sdcard, nor the shared "Internal Storage", for this stuff.
Yup
well, you should be able to transfer files to and from Termux and your internal storage by using the
/storage/emulated/0
folder after using termux-setup-storage
. but it's a bit easier to just do everything using the Termux folderThank you! I will try my main code now.